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