- java.lang.Object
-
- io.rxmicro.validation.base.AbstractListConstraintValidator
-
- io.rxmicro.validation.validator.SizeConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<List<?>>
public class SizeConstraintValidator extends AbstractListConstraintValidator
Validator for theSizeconstraint.- Since:
- 0.1
- Author:
- nedis
- See Also:
Size
-
-
Constructor Summary
Constructors Constructor Description SizeConstraintValidator(int expectedSize)Creates the default instance ofSizeConstraintValidatorwith the specified collection size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(List<?> value, HttpModelType httpModelType, String modelName)Validates the single actual.-
Methods inherited from class io.rxmicro.validation.base.AbstractListConstraintValidator
validateList, validateList
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.rxmicro.validation.ConstraintValidator
validate
-
-
-
-
Constructor Detail
-
SizeConstraintValidator
public SizeConstraintValidator(int expectedSize)
Creates the default instance ofSizeConstraintValidatorwith the specified collection size.- Parameters:
expectedSize- the specified collection size
-
-
Method Detail
-
validate
public void validate(List<?> value, HttpModelType httpModelType, String modelName)
Description copied from interface:ConstraintValidatorValidates the single actual.The state of the
actualmust not be altered.- Parameters:
value- the actual value to validatehttpModelType- the http model typemodelName- the parameter or header name
-
-