Module org.apache.lucene.sandbox
Class TopnOrdinalIterator.TopComparableQueue<T extends Comparable<T>>
java.lang.Object
org.apache.lucene.util.PriorityQueue<TopnOrdinalIterator.OrdComparablePair<T>>
org.apache.lucene.sandbox.facet.iterators.TopnOrdinalIterator.TopComparableQueue<T>
- All Implemented Interfaces:
Iterable<TopnOrdinalIterator.OrdComparablePair<T>>
- Enclosing class:
TopnOrdinalIterator<T extends Comparable<T>>
private static class TopnOrdinalIterator.TopComparableQueue<T extends Comparable<T>>
extends PriorityQueue<TopnOrdinalIterator.OrdComparablePair<T>>
Keeps top N results ordered by Comparable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Determines the ordering of objects in this priority queue.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
-
TopComparableQueue
public TopComparableQueue(int topN) Sole constructor.
-
-
Method Details
-
lessThan
protected boolean lessThan(TopnOrdinalIterator.OrdComparablePair<T> a, TopnOrdinalIterator.OrdComparablePair<T> 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 classPriorityQueue<TopnOrdinalIterator.OrdComparablePair<T extends Comparable<T>>>
- Returns:
true
iff parametera
is less than parameterb
.
-