java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.notempty.NotEmptyValidatorForMap
All Implemented Interfaces:
ConstraintValidator<NotEmpty,Map>

public class NotEmptyValidatorForMap extends Object implements ConstraintValidator<NotEmpty,Map>
Check that the map is not null and not empty.
Author:
Guillaume Smet
  • Constructor Details

    • NotEmptyValidatorForMap

      public NotEmptyValidatorForMap()
  • Method Details

    • isValid

      public boolean isValid(Map map, ConstraintValidatorContext constraintValidatorContext)
      Checks the map is not null and not empty.
      Specified by:
      isValid in interface ConstraintValidator<NotEmpty,Map>
      Parameters:
      map - the map to validate
      constraintValidatorContext - context in which the constraint is evaluated
      Returns:
      returns true if the map is not null and the map is not empty