Class PositiveOrZeroValidatorForByte

java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.number.sign.PositiveOrZeroValidatorForByte
All Implemented Interfaces:
ConstraintValidator<PositiveOrZero,Byte>

public class PositiveOrZeroValidatorForByte extends Object implements ConstraintValidator<PositiveOrZero,Byte>
Check that the number being validated is positive or zero.
Author:
Hardy Ferentschik, Xavier Sosnovsky, Guillaume Smet, Marko Bekhta
  • Constructor Details

    • PositiveOrZeroValidatorForByte

      public PositiveOrZeroValidatorForByte()
  • Method Details

    • isValid

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