Class ComparableRangeValidator<T extends java.lang.Comparable<T>>

  • All Implemented Interfaces:
    Validator

    public class ComparableRangeValidator<T extends java.lang.Comparable<T>>
    extends ComparableValidator<T>
    Generic validator version for a Comparable value limited in a range.
    • Constructor Detail

      • ComparableRangeValidator

        public ComparableRangeValidator()
      • ComparableRangeValidator

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

        public ComparableRangeValidator​(T minValue,
                                        T maxValue)
      • ComparableRangeValidator

        public ComparableRangeValidator​(java.util.Locale locale,
                                        T minValue,
                                        T maxValue)
    • Method Detail

      • getMinimum

        public T getMinimum()
      • setMinimum

        public void setMinimum​(T minValue)
      • getMaximum

        public T getMaximum()
      • setMaximum

        public void setMaximum​(T 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 ComparableValidator<T extends java.lang.Comparable<T>>
        Parameters:
        text - The text to test.
        Returns:
        true if the value is valid; false, otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object