public static class DoublePriorityQueues.SynchronizedPriorityQueue extends java.lang.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 priority queue, or null if it
uses its elements' natural ordering.
|
java.lang.Double |
dequeue()
Deprecated.
|
double |
dequeueDouble()
Dequeues the first element from the queue.
|
void |
enqueue(double x)
Enqueues a new element.
|
void |
enqueue(java.lang.Double x)
Deprecated.
|
boolean |
equals(java.lang.Object o) |
java.lang.Double |
first()
Deprecated.
|
double |
firstDouble()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty()
Checks whether this queue is empty.
|
java.lang.Double |
last()
Deprecated.
|
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.PriorityQueue.enqueue(Object)public double dequeueDouble()
DoublePriorityQueuedequeueDouble in interface DoublePriorityQueueDoublePriorityQueue.dequeue()public double firstDouble()
DoublePriorityQueuefirstDouble in interface DoublePriorityQueueDoublePriorityQueue.first()public double lastDouble()
DoublePriorityQueue
This default implementation just throws an
UnsupportedOperationException.
lastDouble in interface DoublePriorityQueueDoublePriorityQueue.last()public boolean isEmpty()
PriorityQueueThis default implementation checks whether PriorityQueue.size() is zero.
isEmpty in interface PriorityQueue<java.lang.Double>public int size()
PriorityQueuesize in interface PriorityQueue<java.lang.Double>public void clear()
PriorityQueueclear in interface PriorityQueue<java.lang.Double>public void changed()
PriorityQueueThis default implementation just throws an UnsupportedOperationException.
changed in interface PriorityQueue<java.lang.Double>public DoubleComparator comparator()
DoublePriorityQueue
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface DoublePriorityQueuecomparator in interface PriorityQueue<java.lang.Double>PriorityQueue.comparator()@Deprecated public void enqueue(java.lang.Double x)
DoublePriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface DoublePriorityQueueenqueue in interface PriorityQueue<java.lang.Double>x - the element to enqueue.@Deprecated public java.lang.Double dequeue()
DoublePriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface DoublePriorityQueuedequeue in interface PriorityQueue<java.lang.Double>@Deprecated public java.lang.Double first()
DoublePriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface DoublePriorityQueuefirst in interface PriorityQueue<java.lang.Double>@Deprecated public java.lang.Double last()
DoublePriorityQueueThis default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
last in interface DoublePriorityQueuelast in interface PriorityQueue<java.lang.Double>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object