public static class FloatPriorityQueues.SynchronizedPriorityQueue extends java.lang.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.
|
java.lang.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(java.lang.Float x)
Enqueues a new element.
|
java.lang.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.
|
java.lang.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)
FloatPriorityQueue
enqueue
in interface FloatPriorityQueue
x
- the element to enqueue.public float dequeueFloat()
FloatPriorityQueue
dequeueFloat
in interface FloatPriorityQueue
public float firstFloat()
FloatPriorityQueue
firstFloat
in interface FloatPriorityQueue
public float lastFloat()
FloatPriorityQueue
lastFloat
in interface FloatPriorityQueue
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue<java.lang.Float>
public int size()
PriorityQueue
size
in interface PriorityQueue<java.lang.Float>
public void clear()
PriorityQueue
clear
in interface PriorityQueue<java.lang.Float>
public void changed()
PriorityQueue
changed
in interface PriorityQueue<java.lang.Float>
public FloatComparator comparator()
FloatPriorityQueue
Note that this specification strengthens the one given in PriorityQueue.comparator()
.
comparator
in interface FloatPriorityQueue
comparator
in interface PriorityQueue<java.lang.Float>
null
if it uses its elements' natural ordering.PriorityQueue.comparator()
public void enqueue(java.lang.Float x)
PriorityQueue
enqueue
in interface PriorityQueue<java.lang.Float>
x
- the element to enqueue..public java.lang.Float dequeue()
PriorityQueue
dequeue
in interface PriorityQueue<java.lang.Float>
public java.lang.Float first()
PriorityQueue
first
in interface PriorityQueue<java.lang.Float>
public java.lang.Float last()
PriorityQueue
last
in interface PriorityQueue<java.lang.Float>