|
|||||||||
| Home >> All >> org >> apache >> oro >> text >> [ regex overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.oro.text.regex
Class StringSubstitution

java.lang.Objectorg.apache.oro.text.regex.StringSubstitution
- All Implemented Interfaces:
- Substitution
- Direct Known Subclasses:
- Perl5Substitution
- public class StringSubstitution
- extends java.lang.Object
- implements Substitution
- extends java.lang.Object
StringSubstitution implements a Substitution consisting of a simple literal string. This class is intended for use with Util.substitute 55 .
- Since:
- 1.1
- Version:
- @version@
| Field Summary | |
(package private) int |
_subLength
|
(package private) java.lang.String |
_substitution
|
| Constructor Summary | |
StringSubstitution()
Default constructor initializing substitution to a zero length String. |
|
StringSubstitution(java.lang.String substitution)
Creates a StringSubstitution representing the given string. |
|
| Method Summary | |
void |
appendSubstitution(java.lang.StringBuffer appendBuffer,
MatchResult match,
int substitutionCount,
PatternMatcherInput originalInput,
PatternMatcher matcher,
Pattern pattern)
Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far. |
java.lang.String |
getSubstitution()
Returns the string substitution represented by this object. |
void |
setSubstitution(java.lang.String substitution)
Sets the substitution represented by this StringSubstitution. |
java.lang.String |
toString()
Returns the same value as getSubstitution() 55 . |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
_subLength
int _subLength
_substitution
java.lang.String _substitution
| Constructor Detail |
StringSubstitution
public StringSubstitution()
- Default constructor initializing substitution to a zero length
String.
StringSubstitution
public StringSubstitution(java.lang.String substitution)
- Creates a StringSubstitution representing the given string.
| Method Detail |
setSubstitution
public void setSubstitution(java.lang.String substitution)
- Sets the substitution represented by this StringSubstitution. You
should use this method in order to avoid repeatedly allocating new
StringSubstitutions. It is recommended that you allocate a single
StringSubstitution and reuse it by using this method when appropriate.
getSubstitution
public java.lang.String getSubstitution()
- Returns the string substitution represented by this object.
toString
public java.lang.String toString()
- Returns the same value as
getSubstitution()55 .
appendSubstitution
public void appendSubstitution(java.lang.StringBuffer appendBuffer, MatchResult match, int substitutionCount, PatternMatcherInput originalInput, PatternMatcher matcher, Pattern pattern)
- Appends the substitution to a buffer containing the original input
with substitutions applied for the pattern matches found so far.
See
Substitution.appendSubstition() 55
for more details regarding the expected behavior of this method.
- Specified by:
appendSubstitutionin interfaceSubstitution
|
|||||||||
| Home >> All >> org >> apache >> oro >> text >> [ regex overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.oro.text.regex.StringSubstitution