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