Class LongRangeValidator

  • All Implemented Interfaces:
    Validator

    public class LongRangeValidator
    extends IntValidator
    A validator for a long 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

      • LongRangeValidator

        public LongRangeValidator()
      • LongRangeValidator

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

        public LongRangeValidator​(long minValue,
                                  long maxValue)
      • LongRangeValidator

        public LongRangeValidator​(java.util.Locale locale,
                                  long minValue,
                                  long maxValue)
    • Method Detail

      • getMinimum

        public long getMinimum()
      • setMinimum

        public void setMinimum​(long minValue)
      • getMaximum

        public long getMaximum()
      • setMaximum

        public void setMaximum​(long maxValue)
      • 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.