- java.lang.Object
-
- io.rxmicro.validation.base.AbstractContainerConstraintValidator<Set<?>>
-
- io.rxmicro.validation.validator.SizeSetConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<Set<?>>
public class SizeSetConstraintValidator extends AbstractContainerConstraintValidator<Set<?>>
Validator for theSizeconstraint.- Since:
- 0.1
- Author:
- nedis
- See Also:
Size
-
-
Constructor Summary
Constructors Constructor Description SizeSetConstraintValidator(int expectedSize)Creates the default instance ofSizeSetConstraintValidatorwith the specified collection size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(Set<?> value, HttpModelType httpModelType, String modelName)Validates the single actual.-
Methods inherited from class io.rxmicro.validation.base.AbstractContainerConstraintValidator
validateIterable, validateIterable
-
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, validateMapValues, validateMapValues
-
-
-
-
Constructor Detail
-
SizeSetConstraintValidator
public SizeSetConstraintValidator(int expectedSize)
Creates the default instance ofSizeSetConstraintValidatorwith the specified collection size.- Parameters:
expectedSize- the specified collection size
-
-
Method Detail
-
validate
public void validate(Set<?> 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
-
-