Package org.apache.pivot.wtk.validation
Class FormattedValidator<F extends java.text.Format>
- java.lang.Object
-
- org.apache.pivot.wtk.validation.FormattedValidator<F>
-
- All Implemented Interfaces:
Validator
- Direct Known Subclasses:
DecimalValidator
public class FormattedValidator<F extends java.text.Format> extends java.lang.Object implements Validator
A validator for aFormat
'ed value.This class is mostly intended to be a base-class for other validators. Subclasses will set a different
Format
object, which will be used in theisValid(java.lang.String)
method of this base class to do the validation.
-
-
Constructor Summary
Constructors Constructor Description FormattedValidator(F format)
FormattedValidator(F format, 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.
-
-
-
Field Detail
-
format
protected final F extends java.text.Format format
-
locale
protected final java.util.Locale locale
-
-
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.
-
-