public interface MatchConsumer
CharSequenceMatcher
implementation.Modifier and Type | Method and Description |
---|---|
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. |
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 end
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.Copyright © 2024 levigo holding gmbh. All rights reserved.