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