Groovy Documentation

org.codehaus.griffon.runtime.search
[Java] Class RegExReplaceInfo

java.lang.Object
  org.codehaus.griffon.runtime.search.RegExReplaceInfo

class RegExReplaceInfo
extends Object

Information on how to implement a regular expression "replace" operation.

Authors:
Robert Futrell
Version:
1.0


Field Summary
private int endIndex

private String matchedText

private String replacement

private int startIndex

 
Constructor Summary
RegExReplaceInfo(String matchedText, int start, int end, String replacement)

Constructor.

 
Method Summary
int getEndIndex()

Returns the end index of the matched text.

String getMatchedText()

Returns the text that matched the regular expression.

String getReplacement()

Returns the string to replaced the matched text with.

int getStartIndex()

Returns the start index of the matched text.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

endIndex

private int endIndex


matchedText

private String matchedText


replacement

private String replacement


startIndex

private int startIndex


 
Constructor Detail

RegExReplaceInfo

public RegExReplaceInfo(String matchedText, int start, int end, String replacement)
Constructor.
Parameters:
matchedText - The text that matched the regular expression.
start - The start index of the matched text in the CharSequence searched.
end - The end index of the matched text in the CharSequence searched.
replacement - The text to replace the matched text with. This string has any matched groups and character escapes replaced.


 
Method Detail

getEndIndex

public int getEndIndex()
Returns the end index of the matched text.
Returns:
The end index of the matched text in the document searched.
See Also:
getMatchedText()
getEndIndex()


getMatchedText

public String getMatchedText()
Returns the text that matched the regular expression.
Returns:
The matched text.


getReplacement

public String getReplacement()
Returns the string to replaced the matched text with.
Returns:
The string to replace the matched text with.


getStartIndex

public int getStartIndex()
Returns the start index of the matched text.
Returns:
The start index of the matched text in the document searched.
See Also:
getMatchedText()
getEndIndex()


 

Groovy Documentation