Class IntRangeValidator

  • All Implemented Interfaces:
    Validator

    public class IntRangeValidator
    extends IntValidator
    A validator for an int value limited to a range.

    BigInteger math is used here so that proper checks against the limits of the type can be done.

    See Also:
    ComparableRangeValidator
    • Constructor Detail

      • IntRangeValidator

        public IntRangeValidator()
      • IntRangeValidator

        public IntRangeValidator​(java.util.Locale locale)
      • IntRangeValidator

        public IntRangeValidator​(int minValue,
                                 int maxValue)
      • IntRangeValidator

        public IntRangeValidator​(java.util.Locale locale,
                                 int minValue,
                                 int maxValue)
      • IntRangeValidator

        public IntRangeValidator​(Limits limits)
      • IntRangeValidator

        public IntRangeValidator​(java.util.Locale locale,
                                 Limits limits)
    • Method Detail

      • getMinimum

        public int getMinimum()
      • setMinimum

        public void setMinimum​(int minValue)
      • getMaximum

        public int getMaximum()
      • setMaximum

        public void setMaximum​(int maxValue)
      • setLimits

        public void setLimits​(Limits limits)
      • isValid

        public boolean isValid​(java.lang.String text)
        Description copied from interface: Validator
        Determines if a text value is valid based on the rules of the validator.
        Specified by:
        isValid in interface Validator
        Overrides:
        isValid in class FormattedValidator<java.text.NumberFormat>
        Parameters:
        text - The text to test.
        Returns:
        true if the value is valid; false, otherwise.