public static class DoublePriorityQueues.SynchronizedPriorityQueue extends Object implements DoublePriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
changed()
Notifies the queue that the first element has changed (optional operation).
|
void |
clear()
Removes all elements from this queue.
|
DoubleComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
|
Double |
dequeue()
Dequeues the first element from the queue.
|
double |
dequeueDouble()
Dequeues the first element from the queue.
|
void |
enqueue(double x)
Enqueues a new element.
|
void |
enqueue(Double x)
Enqueues a new element.
|
Double |
first()
Returns the first element of the queue.
|
double |
firstDouble()
Returns the first element of the queue.
|
boolean |
isEmpty()
Checks whether the queue is empty.
|
Double |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
double |
lastDouble()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
int |
size()
Returns the number of elements in this queue.
|
public void enqueue(double x)
DoublePriorityQueueenqueue in interface DoublePriorityQueuex - the element to enqueue.public double dequeueDouble()
DoublePriorityQueuedequeueDouble in interface DoublePriorityQueuepublic double firstDouble()
DoublePriorityQueuefirstDouble in interface DoublePriorityQueuepublic double lastDouble()
DoublePriorityQueuelastDouble in interface DoublePriorityQueuepublic boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<Double>public int size()
PriorityQueuesize in interface PriorityQueue<Double>public void clear()
PriorityQueueclear in interface PriorityQueue<Double>public void changed()
PriorityQueuechanged in interface PriorityQueue<Double>public DoubleComparator comparator()
DoublePriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface DoublePriorityQueuecomparator in interface PriorityQueue<Double>null if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(Double x)
PriorityQueueenqueue in interface PriorityQueue<Double>x - the element to enqueue..public Double dequeue()
PriorityQueuedequeue in interface PriorityQueue<Double>public Double first()
PriorityQueuefirst in interface PriorityQueue<Double>public Double last()
PriorityQueuelast in interface PriorityQueue<Double>