public interface FloatPriorityQueue extends PriorityQueue<Float>
PriorityQueue; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens comparator().
| Modifier and Type | Method and Description |
|---|---|
FloatComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
|
default Float |
dequeue()
Deprecated.
Please use the corresponding type-specific method instead.
|
float |
dequeueFloat()
Dequeues the first element from the queue.
|
void |
enqueue(float x)
Enqueues a new element.
|
default void |
enqueue(Float x)
Deprecated.
Please use the corresponding type-specific method instead.
|
default Float |
first()
Deprecated.
Please use the corresponding type-specific method instead.
|
float |
firstFloat()
Returns the first element of the queue.
|
default Float |
last()
Deprecated.
Please use the corresponding type-specific method instead.
|
default float |
lastFloat()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
changed, clear, isEmpty, sizevoid enqueue(float x)
x - the element to enqueue.PriorityQueue.enqueue(Object)float dequeueFloat()
NoSuchElementException - if the queue is empty.dequeue()float firstFloat()
NoSuchElementException - if the queue is empty.first()default float lastFloat()
This default implementation just throws an UnsupportedOperationException.
NoSuchElementException - if the queue is empty.last()FloatComparator comparator()
Note that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface PriorityQueue<Float>PriorityQueue.comparator()@Deprecated default void enqueue(Float x)
This default implementation delegates to the corresponding type-specific method.
enqueue in interface PriorityQueue<Float>x - the element to enqueue.@Deprecated default Float dequeue()
This default implementation delegates to the corresponding type-specific method.
dequeue in interface PriorityQueue<Float>@Deprecated default Float first()
This default implementation delegates to the corresponding type-specific method.
first in interface PriorityQueue<Float>@Deprecated default Float last()
This default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
last in interface PriorityQueue<Float>