|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.XercesRegExpEvaluator
public class XercesRegExpEvaluator
An implementation of the XercesRegExpEvaluator that uses the Regular Expression library in Xerces. For more information about the Xerces Regular Expression library please visit: http://xml.apache.org/xerces-j/apiDocs/org/apache/xerces/utils/regex/RegularExpression.html
Constructor Summary | |
---|---|
XercesRegExpEvaluator()
Creates a new instance. |
|
XercesRegExpEvaluator(String regex)
Creates a new instance with the specified regex. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XercesRegExpEvaluator()
public XercesRegExpEvaluator(String regex)
regex
- The regular expressionMethod Detail |
---|
public void setRegex(String regex)
setRegex
in interface RegExpEvaluator
regex
- the regular expressionpublic String getRegex()
RegExpEvaluator
getRegex
in interface RegExpEvaluator
public boolean matches(String value)
matches
in interface RegExpEvaluator
value
- the String to check the production of
setRegex(java.lang.String)
public String[] split(String value)
RegExpEvaluator
UnsupportedOperationException
.
split
in interface RegExpEvaluator
value
- The value to split.
public String replace(String value, String replacement, boolean firstOnly)
RegExpEvaluator
UnsupportedOperationException
.
replace
in interface RegExpEvaluator
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 |