|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.regex.MatchResultImpl
class MatchResultImpl
Holds the results of a successful match of a regular expression against a given string. Only used internally, thus sparsely documented (though the defining public interface has full documentation).
MatchResult| Constructor Summary | |
|---|---|
MatchResultImpl(String text,
int[] offsets)
|
|
| Method Summary | |
|---|---|
int |
end()
Returns the index of the first character following the text that matched the whole regular expression. |
int |
end(int group)
Returns the index of the first character following the text that matched a given group. |
String |
group()
Returns the text that matched the whole regular expression. |
String |
group(int group)
Returns the text that matched a given group of the regular expression. |
int |
groupCount()
Returns the number of groups in the result, which is always equal to the number of groups in the original regular expression. |
int |
start()
Returns the index of the first character of the text that matched the whole regular expression. |
int |
start(int group)
Returns the index of the first character of the text that matched a given group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
MatchResultImpl(String text,
int[] offsets)
| Method Detail |
|---|
public int end()
MatchResult
end in interface MatchResultpublic int end(int group)
MatchResult
end in interface MatchResultgroup - the group, ranging from 0 to groupCount() - 1, with 0
representing the whole pattern.
public String group()
MatchResult
group in interface MatchResultpublic String group(int group)
MatchResult
group in interface MatchResultgroup - the group, ranging from 0 to groupCount() - 1, with 0
representing the whole pattern.
public int groupCount()
MatchResult
groupCount in interface MatchResultpublic int start()
MatchResult
start in interface MatchResultpublic int start(int group)
MatchResult
start in interface MatchResultgroup - the group, ranging from 0 to groupCount() - 1, with 0
representing the whole pattern.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||