Class NotEmptyValidatorForCharSequence
- java.lang.Object
-
- org.hibernate.validator.internal.constraintvalidators.bv.notempty.NotEmptyValidatorForCharSequence
-
- All Implemented Interfaces:
ConstraintValidator<NotEmpty,CharSequence>
public class NotEmptyValidatorForCharSequence extends Object implements ConstraintValidator<NotEmpty,CharSequence>
Check that the character sequence is not null and its length is strictly superior to 0.- Author:
- Guillaume Smet
-
-
Constructor Summary
Constructors Constructor Description NotEmptyValidatorForCharSequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext)Checks the character sequence is notnulland 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
-
-
-
-
Method Detail
-
isValid
public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext)
Checks the character sequence is notnulland not empty.- Specified by:
isValidin interfaceConstraintValidator<NotEmpty,CharSequence>- Parameters:
charSequence- the character sequence to validateconstraintValidatorContext- context in which the constraint is evaluated- Returns:
- returns
trueif the character sequence is notnulland not empty.
-
-