public class ReplacingArgs
extends java.lang.Object
To learn more, visit the Find and Replace documentation article.
| Modifier and Type | Method and Description |
|---|---|
int |
getGroupIndex()
Identifies, by index, a captured group in the
getMatch() that is to be replaced with the getReplacement() / setReplacement(java.lang.String) string. |
java.util.regex.Matcher |
getMatch()
The
Matcher resulting from a single regular expression match during a Replace. |
Node |
getMatchNode()
Gets the node that contains the beginning of the match.
|
int |
getMatchOffset()
Gets the zero-based starting position of the match from the start of the node that contains the beginning of the match.
|
java.lang.String |
getReplacement()
Gets the replacement string.
|
void |
setGroupIndex(int value)
Identifies, by index, a captured group in the
getMatch() that is to be replaced with the getReplacement() / setReplacement(java.lang.String) string. |
void |
setReplacement(java.lang.String value)
Sets the replacement string.
|
public java.util.regex.Matcher getMatch()
Matcher resulting from a single regular expression match during a Replace.
Matcher.start() gets the zero-based starting position of the match from the start of the find and replace range.
Matcher value.public Node getMatchNode()
public int getMatchOffset()
public java.lang.String getReplacement()
public void setReplacement(java.lang.String value)
value - The replacement string.public int getGroupIndex()
getMatch() that is to be replaced with the getReplacement() / setReplacement(java.lang.String) string.
Default is zero.
int value.public void setGroupIndex(int value)
getMatch() that is to be replaced with the getReplacement() / setReplacement(java.lang.String) string.
Default is zero.
value - The corresponding int value.