|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.dsi.fastutil.doubles.DoublePriorityQueues.SynchronizedPriorityQueue
public static class DoublePriorityQueues.SynchronizedPriorityQueue
A synchronized wrapper class for priority queues.
| Method Summary | |
|---|---|
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. |
java.lang.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(java.lang.Double x)
Enqueues a new element. |
java.lang.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. |
java.lang.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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void enqueue(double x)
DoublePriorityQueue
enqueue in interface DoublePriorityQueuex - the element to enqueue.public double dequeueDouble()
DoublePriorityQueue
dequeueDouble in interface DoublePriorityQueuepublic double firstDouble()
DoublePriorityQueue
firstDouble in interface DoublePriorityQueuepublic double lastDouble()
DoublePriorityQueue
lastDouble in interface DoublePriorityQueuepublic boolean isEmpty()
PriorityQueue
isEmpty in interface PriorityQueue<java.lang.Double>public int size()
PriorityQueue
size in interface PriorityQueue<java.lang.Double>public void clear()
PriorityQueue
clear in interface PriorityQueue<java.lang.Double>public void changed()
PriorityQueue
changed in interface PriorityQueue<java.lang.Double>public DoubleComparator comparator()
DoublePriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface DoublePriorityQueuecomparator in interface PriorityQueue<java.lang.Double>null if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(java.lang.Double x)
PriorityQueue
enqueue in interface PriorityQueue<java.lang.Double>x - the element to enqueue..public java.lang.Double dequeue()
PriorityQueue
dequeue in interface PriorityQueue<java.lang.Double>public java.lang.Double first()
PriorityQueue
first in interface PriorityQueue<java.lang.Double>public java.lang.Double last()
PriorityQueue
last in interface PriorityQueue<java.lang.Double>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||