public final class InMemorySorter extends Object implements BytesRefSorter
BytesRefSorter that keeps all the entries in memory.| Constructor and Description |
|---|
InMemorySorter(Comparator<org.apache.lucene.util.BytesRef> comparator) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.lucene.util.BytesRef utf8)
Adds a single suggestion entry (possibly compound with its bucket).
|
Comparator<org.apache.lucene.util.BytesRef> |
getComparator() |
org.apache.lucene.util.BytesRefIterator |
iterator()
Sorts the entries added in
BytesRefSorter.add(BytesRef) and returns
an iterator over all sorted entries. |
public InMemorySorter(Comparator<org.apache.lucene.util.BytesRef> comparator)
public void add(org.apache.lucene.util.BytesRef utf8)
BytesRefSorteradd in interface BytesRefSorterpublic org.apache.lucene.util.BytesRefIterator iterator()
BytesRefSorterBytesRefSorter.add(BytesRef) and returns
an iterator over all sorted entries.iterator in interface BytesRefSorterpublic Comparator<org.apache.lucene.util.BytesRef> getComparator()
getComparator in interface BytesRefSorterCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.