public final class InMemorySorter extends Object implements BytesRefSorter
BytesRefSorter that keeps all the entries in memory.| Constructor and Description | 
|---|
InMemorySorter(Comparator<BytesRef> comparator)
Creates an InMemorySorter, sorting entries by the
 provided comparator. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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. | 
public InMemorySorter(Comparator<BytesRef> comparator)
public void add(BytesRef utf8)
BytesRefSorteradd in interface BytesRefSorterpublic BytesRefIterator iterator()
BytesRefSorterBytesRefSorter.add(BytesRef) and returns 
 an iterator over all sorted entries.iterator in interface BytesRefSorterpublic Comparator<BytesRef> getComparator()
BytesRefSortergetComparator in interface BytesRefSorterCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.