dk.brics.automaton
public class AutomatonMatcher extends Object implements MatchResult
See Also: RunAutomaton RunAutomaton
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.
|
String | group()
Returns the subsequence of the input found by the previous match.
|
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.
|
Returns: The offset after the last character matched.
Throws: IllegalStateException if there has not been a match attempt or if the last attempt yielded no results.
Parameters: group the desired capturing group.
Returns: The offset after the last character matched of the specified capturing group.
Throws: IllegalStateException if there has not been a match attempt or if the last attempt yielded no results. IndexOutOfBoundsException if the specified capturing group does not exist in the underlying automaton.
Returns: {@code true} if there is a matching subsequence.
Returns: The subsequence of the input found by the previous match.
Throws: IllegalStateException if there has not been a match attempt or if the last attempt yielded no results.
Parameters: group the desired capturing group.
Returns: The subsequence of the input found by the specified capturing group during the previous match operation the previous match. Or {@code null} if the given group did match.
Throws: IllegalStateException if there has not been a match attempt or if the last attempt yielded no results. IndexOutOfBoundsException if the specified capturing group does not exist in the underlying automaton.
Returns: The number of capturing groups in the underlying automaton.
Returns: The offset of the first character matched.
Throws: IllegalStateException if there has not been a match attempt or if the last attempt yielded no results.
Parameters: group the desired capturing group.
Returns: The offset of the first character matched of the specified capturing group.
Throws: IllegalStateException if there has not been a match attempt or if the last attempt yielded no results. IndexOutOfBoundsException if the specified capturing group does not exist in the underlying automaton.