Class NullValidator
- java.lang.Object
-
- org.hibernate.validator.internal.constraintvalidators.bv.NullValidator
-
- All Implemented Interfaces:
ConstraintValidator<Null,Object>
public class NullValidator extends Object implements ConstraintValidator<Null,Object>
Validate that the object isnull- Author:
- Alaa Nassef
-
-
Constructor Summary
Constructors Constructor Description NullValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid(Object object, ConstraintValidatorContext constraintValidatorContext)Implements the validation logic.-
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(Object object, ConstraintValidatorContext constraintValidatorContext)
Description copied from interface:ConstraintValidatorImplements the validation logic. The state ofvaluemust not be altered.This method can be accessed concurrently, thread-safety must be ensured by the implementation.
- Specified by:
isValidin interfaceConstraintValidator<Null,Object>- Parameters:
object- object to validateconstraintValidatorContext- context in which the constraint is evaluated- Returns:
falseifvaluedoes not pass the constraint
-
-