public class SizeValidatorForMap extends Object implements ConstraintValidator<Size,Map<?,?>>
Constructor and Description |
---|
SizeValidatorForMap() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(Size parameters) |
boolean |
isValid(Map<?,?> map,
ConstraintValidatorContext constraintValidatorContext)
Checks the number of entries in a map.
|
public void initialize(Size parameters)
initialize
in interface ConstraintValidator<Size,Map<?,?>>
public boolean isValid(Map<?,?> map, ConstraintValidatorContext constraintValidatorContext)
isValid
in interface ConstraintValidator<Size,Map<?,?>>
map
- The map to validate.constraintValidatorContext
- context in which the constraint is evaluated.true
if the map is null
or the number of entries in map
is between the specified min
and max
values (inclusive),
false
otherwise.Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved