Class NotNullValidator

    • Constructor Detail

      • NotNullValidator

        public NotNullValidator()
    • Method Detail

      • isValid

        public boolean isValid​(Object object,
                               ConstraintValidatorContext constraintValidatorContext)
        Description copied from interface: ConstraintValidator
        Implements the validation logic. The state of value must not be altered.

        This method can be accessed concurrently, thread-safety must be ensured by the implementation.

        Specified by:
        isValid in interface ConstraintValidator<NotNull,​Object>
        Parameters:
        object - object to validate
        constraintValidatorContext - context in which the constraint is evaluated
        Returns:
        false if value does not pass the constraint