Package org.apache.pivot.wtk.validation
Class RegexTextValidator
- java.lang.Object
-
- org.apache.pivot.wtk.validation.RegexTextValidator
-
-
Constructor Summary
Constructors Constructor Description RegexTextValidator()
RegexTextValidator(java.lang.String regexPattern)
RegexTextValidator(java.util.regex.Pattern p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.regex.Pattern
getPattern()
boolean
isValid(java.lang.String text)
Determines if a text value is valid based on the rules of the validator.void
setPattern(java.lang.String regexPattern)
void
setPattern(java.util.regex.Pattern pattern)
-
-
-
Method Detail
-
getPattern
public java.util.regex.Pattern getPattern()
-
setPattern
public void setPattern(java.util.regex.Pattern pattern)
-
setPattern
public void setPattern(java.lang.String regexPattern)
- Parameters:
regexPattern
- The new pattern for this validator.- Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalid.
-
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.
-
-