|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.regexp.shared.MatchResult
public class MatchResult
Pure Java implementation of a regular expression match result.
Constructor Summary | |
---|---|
MatchResult(int index,
java.lang.String input,
java.util.List<java.lang.String> groups)
|
Method Summary | |
---|---|
java.lang.String |
getGroup(int index)
Retrieves the matched string or the given matched group. |
int |
getGroupCount()
Returns the number of groups, including the matched string hence greater or equal than 1. |
int |
getIndex()
Returns the zero-based index of the match in the input string. |
java.lang.String |
getInput()
Returns the original input string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatchResult(int index, java.lang.String input, java.util.List<java.lang.String> groups)
Method Detail |
---|
public java.lang.String getGroup(int index)
index
- the index of the group to return, 0 to return the whole
matched string; must be between 0 and getGroupCount() - 1
included
index
is zero, else the given matched
group. If the given group was optional and did not match, the
behavior is browser-dependent: this method will return null
or an empty string.public int getGroupCount()
public int getIndex()
public java.lang.String getInput()
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |