public static class FloatPriorityQueues.SynchronizedPriorityQueue extends Object implements FloatPriorityQueue
| 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.
|
FloatComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
|
Float |
dequeue()
Dequeues the first element from the queue.
|
float |
dequeueFloat()
Dequeues the first element from the queue.
|
void |
enqueue(float x)
Enqueues a new element.
|
void |
enqueue(Float x)
Enqueues a new element.
|
Float |
first()
Returns the first element of the queue.
|
float |
firstFloat()
Returns the first element of the queue.
|
boolean |
isEmpty()
Checks whether the queue is empty.
|
Float |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
float |
lastFloat()
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(float x)
FloatPriorityQueueenqueue in interface FloatPriorityQueuex - the element to enqueue.public float dequeueFloat()
FloatPriorityQueuedequeueFloat in interface FloatPriorityQueuepublic float firstFloat()
FloatPriorityQueuefirstFloat in interface FloatPriorityQueuepublic float lastFloat()
FloatPriorityQueuelastFloat in interface FloatPriorityQueuepublic boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<Float>public int size()
PriorityQueuesize in interface PriorityQueue<Float>public void clear()
PriorityQueueclear in interface PriorityQueue<Float>public void changed()
PriorityQueuechanged in interface PriorityQueue<Float>public FloatComparator comparator()
FloatPriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface FloatPriorityQueuecomparator in interface PriorityQueue<Float>null if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(Float x)
PriorityQueueenqueue in interface PriorityQueue<Float>x - the element to enqueue..public Float dequeue()
PriorityQueuedequeue in interface PriorityQueue<Float>public Float first()
PriorityQueuefirst in interface PriorityQueue<Float>public Float last()
PriorityQueuelast in interface PriorityQueue<Float>