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
- Enclosing class:
- Lookup
public static final class Lookup.LookupPriorityQueue
- extends PriorityQueue<Lookup.LookupResult>
A PriorityQueue
collecting a fixed size of high priority Lookup.LookupResult
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Lookup.LookupPriorityQueue
public Lookup.LookupPriorityQueue(int size)
lessThan
protected boolean lessThan(Lookup.LookupResult a,
Lookup.LookupResult b)
- Description copied from class:
PriorityQueue
- Determines the ordering of objects in this priority queue. Subclasses
must define this one method.
- Specified by:
lessThan
in class PriorityQueue<Lookup.LookupResult>
- Returns:
true
iff parameter a is less than parameter b.
getResults
public Lookup.LookupResult[] getResults()
- Returns the top N results in descending order.
- Returns:
- the top N results in descending order.