public final class InMemorySorter extends Object implements BytesRefSorter
BytesRefSorter
that keeps all the entries in memory.Constructor and Description |
---|
InMemorySorter(Comparator<BytesRef> comparator) |
Modifier and Type | Method and Description |
---|---|
void |
add(BytesRef utf8)
Adds a single suggestion entry (possibly compound with its bucket).
|
Comparator<BytesRef> |
getComparator() |
BytesRefIterator |
iterator()
Sorts the entries added in
BytesRefSorter.add(BytesRef) and returns
an iterator over all sorted entries. |
public InMemorySorter(Comparator<BytesRef> comparator)
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()
getComparator
in interface BytesRefSorter