java.lang.Object
org.apache.lucene.util.PriorityQueue<TopOrdAndNumberQueue.OrdAndValue>
org.apache.lucene.facet.TopOrdAndNumberQueue
- All Implemented Interfaces:
Iterable<TopOrdAndNumberQueue.OrdAndValue>
- Direct Known Subclasses:
TopOrdAndFloatNumberQueue
,TopOrdAndIntNumberQueue
Keeps highest results, first by largest value, then tie-break by smallest ord.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Holds a single entry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines the ordering of objects in this priority queue.abstract TopOrdAndNumberQueue.OrdAndValue
Create a newTopOrdAndNumberQueue.OrdAndValue
of the appropriate type.Methods inherited from class org.apache.lucene.util.PriorityQueue
add, addAll, clear, getHeapArray, insertWithOverflow, iterator, pop, remove, size, top, updateTop, updateTop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TopOrdAndNumberQueue
public TopOrdAndNumberQueue(int topN) Sole constructor.
-
-
Method Details
-
lessThan
Description copied from class:PriorityQueue
Determines the ordering of objects in this priority queue. Subclasses must define this one method.- Specified by:
lessThan
in classPriorityQueue<TopOrdAndNumberQueue.OrdAndValue>
- Returns:
true
iff parametera
is less than parameterb
.
-
newOrdAndValue
Create a newTopOrdAndNumberQueue.OrdAndValue
of the appropriate type.
-