- java.lang.Object
-
- io.rxmicro.validation.base.AbstractContainerConstraintValidator<Map<?,?>>
-
- io.rxmicro.validation.validator.SizeMapConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<Map<?,?>>
public class SizeMapConstraintValidator extends AbstractContainerConstraintValidator<Map<?,?>>
Validator for theSizeconstraint.- Since:
- 0.1
- Author:
- nedis
- See Also:
Size
-
-
Constructor Summary
Constructors Constructor Description SizeMapConstraintValidator(int expectedSize)Creates the default instance ofSizeMapConstraintValidatorwith the specified map size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(Map<?,?> map, 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
-
SizeMapConstraintValidator
public SizeMapConstraintValidator(int expectedSize)
Creates the default instance ofSizeMapConstraintValidatorwith the specified map size.- Parameters:
expectedSize- the specified map size
-
-
Method Detail
-
validate
public void validate(Map<?,?> map, HttpModelType httpModelType, String modelName)
Description copied from interface:ConstraintValidatorValidates the single actual.The state of the
actualmust not be altered.- Parameters:
map- the actual value to validatehttpModelType- the http model typemodelName- the parameter or header name
-
-