Class NotNullValidator
- java.lang.Object
-
- org.hibernate.validator.internal.constraintvalidators.bv.NotNullValidator
-
- All Implemented Interfaces:
ConstraintValidator<NotNull,Object>
public class NotNullValidator extends Object implements ConstraintValidator<NotNull,Object>
Validate that the object is notnull.- Author:
- Emmanuel Bernard
-
-
Constructor Summary
Constructors Constructor Description NotNullValidator()
-
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<NotNull,Object>- Parameters:
object- object to validateconstraintValidatorContext- context in which the constraint is evaluated- Returns:
falseifvaluedoes not pass the constraint
-
-