public class RegExStringValidator extends java.lang.Object implements IStringValidator
Constructor and Description |
---|
RegExStringValidator(java.lang.String regEx)
Create a new RegExStringValidator that will match the given regular expression.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.String aString)
Check to see if the given String matches the pattern in this validator.
|
public RegExStringValidator(java.lang.String regEx)
regEx
- a non-null regular expression.public boolean accept(java.lang.String aString)
accept
in interface IStringValidator
aString
- the String to check against. Will be considered "not matching" if null.true
if the pattern matches, false
otherwise.