|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.ft.FTBitapSearch
public final class FTBitapSearch
Generalized search algorithm based on the Bitap string matching algorithm.
The implementation is based on the implementation in Wikipedia, but uses
BitSet
for fast bit operation. This version works with a set of
needles and each one of it can be matched in the haystack.
Nested Class Summary | |
---|---|
static interface |
FTBitapSearch.TokenComparator
Token comparator. |
Constructor Summary | |
---|---|
FTBitapSearch(FTIterator h,
FTTokens n,
FTBitapSearch.TokenComparator c)
Constructor. |
Method Summary | |
---|---|
boolean |
hasNext()
Is there one more match? |
int |
next()
Position in the haystack of the next match. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTBitapSearch(FTIterator h, FTTokens n, FTBitapSearch.TokenComparator c)
h
- iterator over the set of elements being searched ("haystack")n
- a list of "needles" (a needle is an array of elements being
searched for)c
- comparator for comparing two elements for equalityMethod Detail |
---|
public boolean hasNext() throws QueryException
true
if yes
QueryException
- if an error occurs during searchpublic int next() throws QueryException
QueryException
- if an error occurs during search
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |