Package org.apache.lucene.search.suggest
Class Lookup.LookupPriorityQueue
java.lang.Object
org.apache.lucene.util.PriorityQueue<Lookup.LookupResult>
org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue
- All Implemented Interfaces:
Iterable<Lookup.LookupResult>
- Enclosing class:
Lookup
A
PriorityQueue collecting a fixed size of high priority Lookup.LookupResult-
Constructor Summary
ConstructorsConstructorDescriptionLookupPriorityQueue(int size) Creates a new priority queue of the specified size. -
Method Summary
Modifier and TypeMethodDescriptionReturns the top N results in descending order.protected booleanMethods inherited from class org.apache.lucene.util.PriorityQueue
add, addAll, clear, getHeapArray, insertWithOverflow, iterator, pop, remove, size, top, updateTop, updateTopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LookupPriorityQueue
public LookupPriorityQueue(int size) Creates a new priority queue of the specified size.
-
-
Method Details
-
lessThan
- Specified by:
lessThanin classPriorityQueue<Lookup.LookupResult>
-
getResults
Returns the top N results in descending order.- Returns:
- the top N results in descending order.
-