Package org.apache.pivot.wtk.validation
Class ComparableRangeValidator<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- org.apache.pivot.wtk.validation.FormattedValidator<java.text.NumberFormat>
-
- org.apache.pivot.wtk.validation.DecimalValidator
-
- org.apache.pivot.wtk.validation.ComparableValidator<T>
-
- org.apache.pivot.wtk.validation.ComparableRangeValidator<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.
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.validation.FormattedValidator
format, locale
-
-
Constructor Summary
Constructors Constructor Description ComparableRangeValidator()
ComparableRangeValidator(java.util.Locale locale)
ComparableRangeValidator(java.util.Locale locale, T minValue, T maxValue)
ComparableRangeValidator(T minValue, T maxValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getMaximum()
T
getMinimum()
boolean
isValid(java.lang.String text)
Determines if a text value is valid based on the rules of the validator.void
setMaximum(T maxValue)
void
setMinimum(T minValue)
java.lang.String
toString()
-
Methods inherited from class org.apache.pivot.wtk.validation.ComparableValidator
textToComparable
-
Methods inherited from class org.apache.pivot.wtk.validation.DecimalValidator
isAutoTrim, parseNumber, setAutoTrim, textToBigDecimal
-
-
-
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-