Class NotEmptyValidatorForMap
java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.notempty.NotEmptyValidatorForMap
- All Implemented Interfaces:
ConstraintValidator<NotEmpty,
Map>
Check that the map is not null and not empty.
- Author:
- Guillaume Smet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid
(Map map, ConstraintValidatorContext constraintValidatorContext) Checks the map is notnull
and 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
-
Constructor Details
-
NotEmptyValidatorForMap
public NotEmptyValidatorForMap()
-
-
Method Details
-
isValid
Checks the map is notnull
and not empty.- Specified by:
isValid
in interfaceConstraintValidator<NotEmpty,
Map> - Parameters:
map
- the map to validateconstraintValidatorContext
- context in which the constraint is evaluated- Returns:
- returns
true
if the map is notnull
and the map is not empty
-