public interface DoublePriorityQueue extends PriorityQueue<Double>
PriorityQueue; provides some additional methods that
use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens comparator().
| Modifier and Type | Method and Description |
|---|---|
DoubleComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it
uses its elements' natural ordering.
|
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.
|
void |
enqueue(Double x)
Deprecated.
Please use the corresponding type-specific method instead.
|
Double |
first()
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
firstDouble()
Returns the first element of the queue.
|
Double |
last()
Deprecated.
Please use the corresponding type-specific method instead.
|
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()
NoSuchElementException - if the queue is empty.dequeue()double firstDouble()
NoSuchElementException - if the queue is empty.first()double lastDouble()
NoSuchElementException - if the queue is empty.last()DoubleComparator comparator()
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface PriorityQueue<Double>PriorityQueue.comparator()@Deprecated void enqueue(Double x)
enqueue in interface PriorityQueue<Double>x - the element to enqueue..@Deprecated Double dequeue()
dequeue in interface PriorityQueue<Double>@Deprecated Double first()
first in interface PriorityQueue<Double>@Deprecated Double last()
last in interface PriorityQueue<Double>