|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RegExpEvaluator
A simple interface for evaluating Regular expressions.
Method Summary | |
---|---|
String |
getRegex()
Returns the regular expression in plain text form. |
boolean |
matches(String value)
Returns true if the given String is matched by the regular expression of this RegExpEvaluator. |
String |
replace(String value,
String replacement,
boolean firstOnly)
Replaces all instances of the regular expression with the replacement string in the supplied value and returns the result. |
void |
setRegex(String regex)
Sets the regular expression to match against during a call to #matches. |
String[] |
split(String value)
Splits the supplied value according to the regular expression. |
Method Detail |
---|
boolean matches(String value)
value
- the String to check the production of
setRegex(java.lang.String)
void setRegex(String regex)
regex
- the regular expressionString getRegex()
String[] split(String value)
UnsupportedOperationException
.
value
- The value to split.
String replace(String value, String replacement, boolean firstOnly)
UnsupportedOperationException
.
value
- The value containing the replacements.replacement
- The string use as the replacement.firstOnly
- Whether to replace only the first instance or all instances.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |