com.levigo.jadice.search
Interface MatchConsumer


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

match

void match(int start,
           int end)
Notifies the 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:

Parameters:
start - the index of the first character matched
end - the index after the last character matched

match

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. The details of the start and end indexes are specified at the match(int, int) method.
The handback object will not be interpreted in any manner and simply passed through the processing to Result.getHandback()

Parameters:
start - the index of the first character matched
end - the index after the last character matched
handback - a handback object of any type and value.


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.