Class NegativeOrZeroValidatorForInteger

    • Constructor Detail

      • NegativeOrZeroValidatorForInteger

        public NegativeOrZeroValidatorForInteger()
    • Method Detail

      • isValid

        public boolean isValid​(Integer value,
                               ConstraintValidatorContext context)
        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<NegativeOrZero,​Integer>
        Parameters:
        value - object to validate
        context - context in which the constraint is evaluated
        Returns:
        false if value does not pass the constraint