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

public Class NotEmptyValidatorForArray

extends Object
implements ConstraintValidator<NotEmpty, Object[]>
Class Inheritance
All Implemented Interfaces
jakarta.validation.ConstraintValidator
Imports
jakarta.validation.ConstraintValidator, .ConstraintValidatorContext, jakarta.validation.constraints.NotEmpty

Check that the array 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 array is not null and the array is not empty
isValid
(Object[]
the array to validate
array
,
ConstraintValidatorContext
context in which the constraint is evaluated
constraintValidatorContext
)

Implements jakarta.validation.ConstraintValidator.isValid.

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

Constructor Detail

NotEmptyValidatorForArrayback to summary
public NotEmptyValidatorForArray()

Method Detail

isValidback to summary
public boolean isValid(Object[] array, ConstraintValidatorContext constraintValidatorContext)

Implements jakarta.validation.ConstraintValidator.isValid.

Checks the array is not null and not empty.

Parameters
array:Object[]

the array to validate

constraintValidatorContext:ConstraintValidatorContext

context in which the constraint is evaluated

Returns:boolean

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

Annotations
@Override