| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--COM.stevesoft.pat.Replacer
The only potential difference between using the methods of
Replacer to do the replacing is that Replacer remembers changes
to the replacing object between calls to replaceAll, replaceFirst
etc. For details, see the example file
trans3.java.
| Constructor Summary | |
| Replacer()
Instantiate a new Replacer. |
|
| Method Summary | |
| void | apply1(RegRes rr)
|
| void | apply(RegRes r,
ReplaceRule rp)
This method allows you to apply the results of several matches in a sequence to modify a String of text. |
| void | apply(Regex r)
Another form of apply, it is the same as apply(r,r.getReplaceRule()). |
| java.lang.Object | clone()
|
| java.lang.String | finish()
This finishes the replacement, appending the right() part of the last RegRes given to substitute(RegRes). |
| boolean | isSpecial(ReplaceRule x)
|
| int | lastMatchedTo()
|
| java.lang.String | replaceAllFrom(java.lang.String s,
int start)
|
| java.lang.String | replaceAllRegion(java.lang.String s,
Regex r,
int start,
int end)
This method replaces all occurences of the Regex in the String starting with postition pos according to the Replacer rule of this object. |
| java.lang.String | replaceAllRegion(java.lang.String s,
int start,
int end)
|
| java.lang.String | replaceAll(java.lang.String s)
|
| java.lang.String | replaceFirstFrom(java.lang.String s,
int start)
|
| java.lang.String | replaceFirstRegion(java.lang.String s,
Regex r,
int start,
int end)
This method replaces the first occurence of the Regex in the String starting with position pos according to the Replacer rule of this object. |
| java.lang.String | replaceFirstRegion(java.lang.String s,
int start,
int end)
|
| java.lang.String | replaceFirst(java.lang.String s)
|
| boolean | WantMoreText()
|
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Constructor Detail |
public Replacer()
| Method Detail |
public java.lang.String replaceFirstRegion(java.lang.String s,
Regex r,
int start,
int end)
public java.lang.String replaceFirst(java.lang.String s)
public java.lang.String replaceFirstFrom(java.lang.String s,
int start)
public java.lang.String replaceFirstRegion(java.lang.String s,
int start,
int end)
public java.lang.String replaceAllRegion(java.lang.String s,
Regex r,
int start,
int end)
public java.lang.String replaceAll(java.lang.String s)
public java.lang.String replaceAllFrom(java.lang.String s,
int start)
public java.lang.String replaceAllRegion(java.lang.String s,
int start,
int end)
public final boolean isSpecial(ReplaceRule x)
public final void apply1(RegRes rr)
public void apply(RegRes r,
ReplaceRule rp)
public boolean WantMoreText()
public void apply(Regex r)
public java.lang.String finish()
public java.lang.Object clone()
public int lastMatchedTo()
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||