|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdk.brics.automaton.AutomatonMatcher
public class AutomatonMatcher
A tool that performs match operations on a given character sequence using a compiled automaton.
RunAutomaton.newMatcher(java.lang.CharSequence),
RunAutomaton.newMatcher(java.lang.CharSequence, int, int)| Method Summary | |
|---|---|
int |
end()
Returns the offset after the last character matched. |
int |
end(int group)
Returns the offset after the last character matched of the specified capturing group. |
boolean |
find()
Find the next matching subsequence of the input. |
java.lang.String |
group()
Returns the subsequence of the input found by the previous match. |
java.lang.String |
group(int group)
Returns the subsequence of the input found by the specified capturing group during the previous match operation. |
int |
groupCount()
Returns the number of capturing groups in the underlying automaton. |
int |
start()
Returns the offset of the first character matched. |
int |
start(int group)
Returns the offset of the first character matched of the specified capturing group. |
java.util.regex.MatchResult |
toMatchResult()
Returns the current state of this AutomatonMatcher as a
MatchResult. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean find()
start, end, and
group methods.
true if there is a matching subsequence.
public int end()
throws java.lang.IllegalStateException
end in interface java.util.regex.MatchResultjava.lang.IllegalStateException - if there has not been a match attempt or
if the last attempt yielded no results.
public int end(int group)
throws java.lang.IndexOutOfBoundsException,
java.lang.IllegalStateException
end in interface java.util.regex.MatchResultgroup - the desired capturing group.
java.lang.IllegalStateException - if there has not been a match attempt or
if the last attempt yielded no results.
java.lang.IndexOutOfBoundsException - if the specified capturing group does
not exist in the underlying automaton.
public java.lang.String group()
throws java.lang.IllegalStateException
group in interface java.util.regex.MatchResultjava.lang.IllegalStateException - if there has not been a match attempt or
if the last attempt yielded no results.
public java.lang.String group(int group)
throws java.lang.IndexOutOfBoundsException,
java.lang.IllegalStateException
group in interface java.util.regex.MatchResultgroup - the desired capturing group.
null if the given group did match.
java.lang.IllegalStateException - if there has not been a match attempt or
if the last attempt yielded no results.
java.lang.IndexOutOfBoundsException - if the specified capturing group does
not exist in the underlying automaton.public int groupCount()
groupCount in interface java.util.regex.MatchResult
public int start()
throws java.lang.IllegalStateException
start in interface java.util.regex.MatchResultjava.lang.IllegalStateException - if there has not been a match attempt or
if the last attempt yielded no results.
public int start(int group)
throws java.lang.IndexOutOfBoundsException,
java.lang.IllegalStateException
start in interface java.util.regex.MatchResultgroup - the desired capturing group.
java.lang.IllegalStateException - if there has not been a match attempt or
if the last attempt yielded no results.
java.lang.IndexOutOfBoundsException - if the specified capturing group does
not exist in the underlying automaton.public java.util.regex.MatchResult toMatchResult()
AutomatonMatcher as a
MatchResult.
The result is unaffected by subsequent operations on this object.
MatchResult with the state of this
AutomatonMatcher.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||