public class BasicFinder<OT> extends Object implements SimpleFinder<OT>
MAX_MATCHES| Constructor and Description |
|---|
BasicFinder(BasicRegistry br,
Class<OT> otClz) |
| Modifier and Type | Method and Description |
|---|---|
protected List<OT> |
collectMatches(Pattern p) |
long |
countMatches(Pattern p,
int maxAllowed)
Count the number of available matches, but throw an exception if count goes strictly
higher than maxAllowed.
|
ResultSequence<OT> |
deliverMatchesUntilDone(Pattern p,
Receiver<OT> r) |
List<OT> |
findAllMatches(Pattern p,
int minAllowed,
int maxAllowed)
Find all matches, and return in an arbitrary order, but will throw an exception
if available number of matches for the pattern is not within closed (inclusive)
interval [minAllowed, maxAllowed].
|
OT |
findFirstMatch(Pattern p,
int minAllowed,
int maxAllowed)
Seeks only one match, chosen arbitrarily from available matches,
but will throw an exception if available number of
matches for the pattern is not within closed (inclusive) interval
[minAllowed, maxAllowed].
|
void |
killDeliverySequence(ResultSequence resultSeq) |
protected ResultSequence<OT> |
makeResultSequence(Pattern p,
Receiver<OT> r) |
protected void |
verifyMatchCount(int matchCount,
int minAllowed,
int maxAllowed,
Pattern patForError) |
public BasicFinder(BasicRegistry br, Class<OT> otClz)
protected ResultSequence<OT> makeResultSequence(Pattern p, Receiver<OT> r)
public ResultSequence<OT> deliverMatchesUntilDone(Pattern p, Receiver<OT> r)
deliverMatchesUntilDone in interface Finder<OT>protected void verifyMatchCount(int matchCount,
int minAllowed,
int maxAllowed,
Pattern patForError)
throws Exception
Exceptionpublic OT findFirstMatch(Pattern p, int minAllowed, int maxAllowed) throws Exception
SimpleFinderfindFirstMatch in interface SimpleFinder<OT>p - pattern which must be matched by the registered object descriptions.minAllowed - the minimum number of matches allowed for this Pattern.maxAllowed - the maximum number of matches allowed for this Pattern.Exceptionpublic List<OT> findAllMatches(Pattern p, int minAllowed, int maxAllowed) throws Exception
SimpleFinderfindAllMatches in interface SimpleFinder<OT>p - pattern which must be matched by the registered object description. *minAllowed - minimum number of matches allowed for this Pattern.maxAllowed - maximum number of matches allowed for this Pattern.Exceptionpublic long countMatches(Pattern p, int maxAllowed) throws Exception
SimpleFindercountMatches in interface SimpleFinder<OT>maxAllowed - maximum number of matches allowed for this Pattern.Exceptionpublic void killDeliverySequence(ResultSequence resultSeq)
killDeliverySequence in interface Finder<OT>Copyright © 2010-2015. All Rights Reserved.