Package org.apache.pivot.wtk.validation
Class FloatValidator
- java.lang.Object
-
- org.apache.pivot.wtk.validation.FormattedValidator<java.text.NumberFormat>
-
- org.apache.pivot.wtk.validation.DecimalValidator
-
- org.apache.pivot.wtk.validation.FloatValidator
-
- All Implemented Interfaces:
Validator
- Direct Known Subclasses:
FloatRangeValidator
public class FloatValidator extends DecimalValidator
A validator for a float value.Beware that usual math rules for native primitive types (and related approximations) are applied here.
- See Also:
BigDecimalValidator
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.validation.FormattedValidator
format, locale
-
-
Constructor Summary
Constructors Constructor Description FloatValidator()
FloatValidator(java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid(java.lang.String text)
Determines if a text value is valid based on the rules of the validator.-
Methods inherited from class org.apache.pivot.wtk.validation.DecimalValidator
isAutoTrim, parseNumber, setAutoTrim, textToBigDecimal
-
-
-
-
Method Detail
-
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.
-
-