Top Description Constructors Methods
org.hibernate.validator.internal.constraintvalidators.bv.notempty

public Class NotEmptyValidatorForMap

extends Object
implements ConstraintValidator<NotEmpty, Map<K, V>>
Class Inheritance
All Implemented Interfaces
jakarta.validation.ConstraintValidator
Annotations
@SuppressWarnings:rawtypes
Imports
java.util.Map, jakarta.validation.ConstraintValidator, .ConstraintValidatorContext, jakarta.validation.constraints.NotEmpty

Check that the map is not null and not empty.
Author
Guillaume Smet

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

returns true if the map is not null and the map is not empty
isValid
(Map<K, V>
the map to validate
map
,
ConstraintValidatorContext
context in which the constraint is evaluated
constraintValidatorContext
)

Implements jakarta.validation.ConstraintValidator.isValid.

Checks the map is not null and not empty.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NotEmptyValidatorForMapback to summary
public NotEmptyValidatorForMap()

Method Detail

isValidback to summary
public boolean isValid(Map<K, V> map, ConstraintValidatorContext constraintValidatorContext)

Implements jakarta.validation.ConstraintValidator.isValid.

Checks the map is not null and not empty.

Parameters
map:Map<K, V>

the map to validate

constraintValidatorContext:ConstraintValidatorContext

context in which the constraint is evaluated

Returns:boolean

returns true if the map is not null and the map is not empty

Annotations
@Override