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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isValid(Map map, jakarta.validation.ConstraintValidatorContext constraintValidatorContext)
    Checks the map is not null 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

      public boolean isValid(Map map, jakarta.validation.ConstraintValidatorContext constraintValidatorContext)
      Checks the map is not null and not empty.
      Specified by:
      isValid in interface jakarta.validation.ConstraintValidator<jakarta.validation.constraints.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