|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MatchConsumer
Callback interface which will consume matches found by a CharSequenceMatcher
implementation.
Method Summary | |
---|---|
void |
match(int start,
int end)
Notifies the MatchConsumer about a successful match in the CharSequenceMatcher
provided to the CharSequenceMatcher.findMatches(CharSequence, MatchConsumer) . |
void |
match(int start,
int end,
Object handback)
Notifies the MatchConsumer about a successful match in the CharSequenceMatcher
provided to the CharSequenceMatcher.findMatches(CharSequence, MatchConsumer) and has
the ability to add a handback object. |
Method Detail |
---|
void match(int start, int end)
MatchConsumer
about a successful match in the CharSequenceMatcher
provided to the CharSequenceMatcher.findMatches(CharSequence, MatchConsumer)
. The
start
and end
indexes have to be in the following form:start
: The start index of the first character matched. That means that
a sequence found from index 5 to index 6, the value of start
will be
5
end
: The end index of the last character matched plus 1. That means
that a sequence found from index 5 to index 6, the value of start
will be
7
start
- the index of the first character matchedend
- the index after the last character matchedvoid match(int start, int end, Object handback)
MatchConsumer
about a successful match in the CharSequenceMatcher
provided to the CharSequenceMatcher.findMatches(CharSequence, MatchConsumer)
and has
the ability to add a handback
object. The details of the
start
and end
indexes are specified at the match(int, int)
method. handback
object will not be interpreted in any manner and
simply passed through the processing to Result.getHandback()
start
- the index of the first character matchedend
- the index after the last character matchedhandback
- a handback
object of any type and value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |