|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.JakartaOroEvaluator
public class JakartaOroEvaluator
An implementation of the RegExpEvaluator that uses the Jakarta ORO Regular Expression library. Please ensure that this library added to your classpath (jakarta-oro-2.0.8.jar or later version). For more information about the Jakarta ORO library please visit: http://jakarta.apache.org/oro/
Field Summary | |
---|---|
static int |
AWK_COMPILE
Flag used to specify that the regular expression should be interpreted in AWK style. |
static int |
GLOB_COMPILE
Flag used to specify that the regular expression should be interpreted in GLOB style. |
static int |
PERL5_COMPILE
Flag used to specify that the regular expression should be interpreted in PERL5 style. |
Constructor Summary | |
---|---|
JakartaOroEvaluator()
Creates a new instance. |
|
JakartaOroEvaluator(String regex,
int regexType)
Creates a new instance with the specified regex and type. |
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 |
Field Detail |
---|
public static final int AWK_COMPILE
public static final int GLOB_COMPILE
public static final int PERL5_COMPILE
Constructor Detail |
---|
public JakartaOroEvaluator()
public JakartaOroEvaluator(String regex, int regexType)
regex
- The regular expression.regexType
- The type of the regular expression (one of AWK_COMPILE
, GLOB_COMPILE
or PERL5_COMPILE
).Method 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 |