public class SizeValidatorForArrayOfObject extends SizeValidator implements ConstraintValidator<Size,Object[]>
max, min| Constructor and Description |
|---|
SizeValidatorForArrayOfObject() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid(Object[] array,
ConstraintValidatorContext context)
Checks the number of entries in an array.
|
initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializepublic boolean isValid(Object[] array, ConstraintValidatorContext context)
isValid in interface ConstraintValidator<Size,Object[]>array - The array to validate.context - context in which the constraint is evaluated.true if the array is null or the number of entries in
array is between the specified min and max values (inclusive),
false otherwise.Copyright © 2010–2024 The Apache Software Foundation. All rights reserved.