Package org.apache.pivot.wtk.validation
Class LongRangeValidator
- java.lang.Object
-
- org.apache.pivot.wtk.validation.FormattedValidator<java.text.NumberFormat>
-
- org.apache.pivot.wtk.validation.DecimalValidator
-
- org.apache.pivot.wtk.validation.IntValidator
-
- org.apache.pivot.wtk.validation.LongRangeValidator
-
- All Implemented Interfaces:
Validator
public class LongRangeValidator extends IntValidator
A validator for along
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
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.validation.FormattedValidator
format, locale
-
-
Constructor Summary
Constructors Constructor Description LongRangeValidator()
LongRangeValidator(long minValue, long maxValue)
LongRangeValidator(java.util.Locale locale)
LongRangeValidator(java.util.Locale locale, long minValue, long maxValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getMaximum()
long
getMinimum()
boolean
isValid(java.lang.String text)
Determines if a text value is valid based on the rules of the validator.void
setMaximum(long maxValue)
void
setMinimum(long minValue)
-
Methods inherited from class org.apache.pivot.wtk.validation.DecimalValidator
isAutoTrim, parseNumber, setAutoTrim, textToBigDecimal
-
-
-
-
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 interfaceValidator
- Overrides:
isValid
in classFormattedValidator<java.text.NumberFormat>
- Parameters:
text
- The text to test.- Returns:
true
if the value is valid;false
, otherwise.
-
-