TopOrdAndNumberQueue (Lucene 10.5.0 facet API)
Description: declaration: package: org.apache.lucene.facet, class: TopOrdAndNumberQueue

Package org.apache.lucene.facet

# Class TopOrdAndNumberQueue

java.lang.Object
org.apache.lucene.util.PriorityQueue<TopOrdAndNumberQueue.OrdAndValue>
org.apache.lucene.facet.TopOrdAndNumberQueue

All Implemented Interfaces:
  `Iterable<TopOrdAndNumberQueue.OrdAndValue>`

Direct Known Subclasses:
  `TopOrdAndFloatQueue`, `TopOrdAndIntQueue`

public abstract class TopOrdAndNumberQueue extends PriorityQueue<TopOrdAndNumberQueue.OrdAndValue>
Keeps highest results, first by largest value, then tie-break by smallest ord.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `TopOrdAndNumberQueue.OrdAndValue`
  Holds a single entry.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TopOrdAndNumberQueue(int topN)`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `lessThan(TopOrdAndNumberQueue.OrdAndValue a, TopOrdAndNumberQueue.OrdAndValue b)`
  `abstract TopOrdAndNumberQueue.OrdAndValue`
  `newOrdAndValue()`
  Create a new `TopOrdAndNumberQueue.OrdAndValue` of the appropriate type.

  ### Methods inherited from class org.apache.lucene.util.PriorityQueue

  `add, addAll, 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

    public boolean lessThan(TopOrdAndNumberQueue.OrdAndValue a, TopOrdAndNumberQueue.OrdAndValue b)
    Specified by:
      `lessThan` in class `PriorityQueue<TopOrdAndNumberQueue.OrdAndValue>`

  - ### newOrdAndValue

    public abstract TopOrdAndNumberQueue.OrdAndValue newOrdAndValue()
    Create a new `TopOrdAndNumberQueue.OrdAndValue` of the appropriate type.