Class NotEmptyValidatorForArray
java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.notempty.NotEmptyValidatorForArray
- All Implemented Interfaces:
jakarta.validation.ConstraintValidator<jakarta.validation.constraints.NotEmpty,
Object[]>
public class NotEmptyValidatorForArray
extends Object
implements jakarta.validation.ConstraintValidator<jakarta.validation.constraints.NotEmpty,Object[]>
Check that the array is not null and not empty.
- Author:
- Guillaume Smet
-
Constructor Details
-
NotEmptyValidatorForArray
public NotEmptyValidatorForArray()
-
-
Method Details
-
isValid
public boolean isValid(Object[] array, jakarta.validation.ConstraintValidatorContext constraintValidatorContext) Checks the array is notnull
and not empty.- Specified by:
isValid
in interfacejakarta.validation.ConstraintValidator<jakarta.validation.constraints.NotEmpty,
Object[]> - Parameters:
array
- the array to validateconstraintValidatorContext
- context in which the constraint is evaluated- Returns:
- returns
true
if the array is notnull
and the array is not empty
-