Class NotEmptyValidatorForCollection
- java.lang.Object
-
- org.hibernate.validator.internal.constraintvalidators.bv.notempty.NotEmptyValidatorForCollection
-
- All Implemented Interfaces:
ConstraintValidator<NotEmpty,Collection>
public class NotEmptyValidatorForCollection extends Object implements ConstraintValidator<NotEmpty,Collection>
Check that the collection is not null and not empty.- Author:
- Guillaume Smet
-
-
Constructor Summary
Constructors Constructor Description NotEmptyValidatorForCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid(Collection collection, ConstraintValidatorContext constraintValidatorContext)Checks the collection is notnulland not empty.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
-
-
-
Method Detail
-
isValid
public boolean isValid(Collection collection, ConstraintValidatorContext constraintValidatorContext)
Checks the collection is notnulland not empty.- Specified by:
isValidin interfaceConstraintValidator<NotEmpty,Collection>- Parameters:
collection- the collection to validateconstraintValidatorContext- context in which the constraint is evaluated- Returns:
- returns
trueif the collection is notnulland the collection is not empty
-
-