com.levigo.jadice.search
Class PatternSearchRequest.PatternMatcher

java.lang.Object
  extended by com.levigo.jadice.search.PatternSearchRequest.PatternMatcher
All Implemented Interfaces:
CharSequenceMatcher
Enclosing class:
PatternSearchRequest

protected static final class PatternSearchRequest.PatternMatcher
extends Object
implements CharSequenceMatcher


Constructor Summary
PatternSearchRequest.PatternMatcher(Pattern[] patterns)
           
 
Method Summary
 void cancel()
          Tells the CharSequenceMatcher that the current search request has been canceled ( AbstractCharSequenceSearchRequest.cancel().
The CharSequenceMatcher.findMatches(CharSequence, MatchConsumer) implementation has to take care that the search loop will be stopped and that the method returns as fast as possible.
 void findMatches(CharSequence charSequence, MatchConsumer matchConsumer)
           Runs the search for some sequence of characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternSearchRequest.PatternMatcher

public PatternSearchRequest.PatternMatcher(Pattern[] patterns)
Method Detail

findMatches

public void findMatches(CharSequence charSequence,
                        MatchConsumer matchConsumer)
Description copied from interface: CharSequenceMatcher

Runs the search for some sequence of characters. Implementations are free to decide how to search for matches in the given CharSequence. Results found have to be provided to the MatchConsumer.match(int, int) or MatchConsumer.match(int, int, Object) methods.

IMPORTANT: If the CharSequenceMatcher.cancel() method has been called, the implementation of this method has to take care of shutting down as soon as possible.

Specified by:
findMatches in interface CharSequenceMatcher
Parameters:
charSequence - the source text
matchConsumer - the MatchConsumer which will get notified about any matches found.

cancel

public void cancel()
Description copied from interface: CharSequenceMatcher
Tells the CharSequenceMatcher that the current search request has been canceled ( AbstractCharSequenceSearchRequest.cancel().
The CharSequenceMatcher.findMatches(CharSequence, MatchConsumer) implementation has to take care that the search loop will be stopped and that the method returns as fast as possible.

Specified by:
cancel in interface CharSequenceMatcher


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