org.apache.pivot.wtk.validation
Class FloatValidator

java.lang.Object
  extended by org.apache.pivot.wtk.validation.FormattedValidator<NumberFormat>
      extended by org.apache.pivot.wtk.validation.DecimalValidator
          extended by 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
FloatValidator()
           
FloatValidator(Locale locale)
           
 
Method Summary
 boolean isValid(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatValidator

public FloatValidator()

FloatValidator

public FloatValidator(Locale locale)
Method Detail

isValid

public boolean isValid(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<NumberFormat>
Returns:
true if the value is valid; false, otherwise.