|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.suggest.InMemorySorter
public final class InMemorySorter
An BytesRefSorter
that keeps all the entries in memory.
Constructor Summary | |
---|---|
InMemorySorter(Comparator<BytesRef> comparator)
Creates an InMemorySorter, sorting entries by the provided comparator. |
Method Summary | |
---|---|
void |
add(BytesRef utf8)
Adds a single suggestion entry (possibly compound with its bucket). |
Comparator<BytesRef> |
getComparator()
Comparator used to determine the sort order of entries. |
BytesRefIterator |
iterator()
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns
an iterator over all sorted entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InMemorySorter(Comparator<BytesRef> comparator)
Method Detail |
---|
public void add(BytesRef utf8)
BytesRefSorter
add
in interface BytesRefSorter
public BytesRefIterator iterator()
BytesRefSorter
BytesRefSorter.add(BytesRef)
and returns
an iterator over all sorted entries.
iterator
in interface BytesRefSorter
public Comparator<BytesRef> getComparator()
BytesRefSorter
getComparator
in interface BytesRefSorter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |