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