Class IntegerValidator


public final class IntegerValidator extends NumberValidator<Integer>
Validator for int primitives.
  • Constructor Details

    • IntegerValidator

      public IntegerValidator(String propertyName, int propertyValue)
      Constructs a new validator for int primitives.
      Parameters:
      propertyName - the property name
      propertyValue - the property value
  • Method Details

    • isGreaterThan

      public final void isGreaterThan(int thresholdValue)
      Asserts the value is greater than some threshold.
      Parameters:
      thresholdValue - the threshold value
    • isGreaterThan

      public final void isGreaterThan(String thresholdName, int thresholdValue)
      Asserts the value is greater than some threshold.
      Parameters:
      thresholdName - the threshold name
      thresholdValue - the threshold value
    • isGreaterThanOrEqualTo

      public final void isGreaterThanOrEqualTo(int thresholdValue)
      Asserts the value is greater than or equal to some threshold.
      Parameters:
      thresholdValue - the threshold value
    • isGreaterThanOrEqualTo

      public final void isGreaterThanOrEqualTo(String thresholdName, int thresholdValue)
      Asserts the value is greater than or equal to some threshold.
      Parameters:
      thresholdName - the threshold name
      thresholdValue - the threshold value
    • isLessThan

      public final void isLessThan(int thresholdValue)
      Asserts the value is less than some threshold.
      Parameters:
      thresholdValue - the threshold value
    • isLessThan

      public final void isLessThan(String thresholdName, int thresholdValue)
      Asserts the value is less than some threshold.
      Parameters:
      thresholdName - the threshold name
      thresholdValue - the threshold value
    • isLessThanOrEqualTo

      public final void isLessThanOrEqualTo(int thresholdValue)
      Asserts the value is less than or equal to some threshold.
      Parameters:
      thresholdValue - the threshold value
    • isLessThanOrEqualTo

      public final void isLessThanOrEqualTo(String thresholdName, int thresholdValue)
      Asserts the value is less than or equal to some threshold.
      Parameters:
      thresholdName - the threshold name
      thresholdValue - the threshold value
    • isEqualTo

      public final void isEqualTo(int parameterValue)
      Asserts the value equals some other parameter.
      Parameters:
      parameterValue - the parameter value
    • isEqualTo

      public final void isEqualTo(String parameterName, int parameterValue)
      Asserts the value equals some other parameter.
      Parameters:
      parameterName - the parameter name
      parameterValue - the parameter value
    • isNotEqualTo

      public final void isNotEqualTo(int parameterValue)
      Asserts the value is not equal to some other parameter.
      Parameters:
      parameterValue - the parameter value
    • isNotEqualTo

      public final void isNotEqualTo(String parameterName, int parameterValue)
      Asserts the value is not equal to some other parameter.
      Parameters:
      parameterName - the parameter name
      parameterValue - the parameter value
    • isDivisibleBy

      public final void isDivisibleBy(int divisorValue)
      Asserts the value is divisible by some divisor.
      Parameters:
      divisorValue - the divisor value
    • isDivisibleBy

      public final void isDivisibleBy(String divisorName, int divisorValue)
      Asserts the value is divisible by some divisor.
      Parameters:
      divisorName - the divisor name, or null if no name is associated with the value
      divisorValue - the divisor value
    • isBetween

      public final void isBetween(int lower, int upper)
      Asserts the value is between the given lower and upper bounds, inclusive.
      Parameters:
      lower - the lower bound
      upper - the upper bound