PriorityQueue<java.lang.Long>AbstractLongPriorityQueue, LongArrayFIFOQueue, LongArrayPriorityQueue, LongHeapPriorityQueue, LongPriorityQueues.SynchronizedPriorityQueuepublic interface LongPriorityQueue extends PriorityQueue<java.lang.Long>
PriorityQueue; provides some additional methods that
use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens comparator().
| Modifier and Type | Method | Description |
|---|---|---|
LongComparator |
comparator() |
Returns the comparator associated with this priority queue, or null if it
uses its elements' natural ordering.
|
default java.lang.Long |
dequeue() |
Deprecated.
Please use the corresponding type-specific method instead.
|
long |
dequeueLong() |
Dequeues the first element from the queue.
|
void |
enqueue(long x) |
Enqueues a new element.
|
default void |
enqueue(java.lang.Long x) |
Deprecated.
Please use the corresponding type-specific method instead.
|
default java.lang.Long |
first() |
Deprecated.
Please use the corresponding type-specific method instead.
|
long |
firstLong() |
Returns the first element of the queue.
|
default java.lang.Long |
last() |
Deprecated.
Please use the corresponding type-specific method instead.
|
default long |
lastLong() |
Returns the last element of the queue, that is, the element the would be
dequeued last (optional operation).
|
changed, clear, isEmpty, sizevoid enqueue(long x)
x - the element to enqueue.PriorityQueue.enqueue(Object)long dequeueLong()
java.util.NoSuchElementException - if the queue is empty.dequeue()long firstLong()
java.util.NoSuchElementException - if the queue is empty.first()default long lastLong()
This default implementation just throws an
UnsupportedOperationException.
java.util.NoSuchElementException - if the queue is empty.last()LongComparator comparator()
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface PriorityQueue<java.lang.Long>PriorityQueue.comparator()@Deprecated default void enqueue(java.lang.Long x)
This default implementation delegates to the corresponding type-specific method.
enqueue in interface PriorityQueue<java.lang.Long>x - the element to enqueue.@Deprecated default java.lang.Long dequeue()
This default implementation delegates to the corresponding type-specific method.
dequeue in interface PriorityQueue<java.lang.Long>@Deprecated default java.lang.Long first()
This default implementation delegates to the corresponding type-specific method.
first in interface PriorityQueue<java.lang.Long>@Deprecated default java.lang.Long last()
This default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
last in interface PriorityQueue<java.lang.Long>