public static class CharPriorityQueues.SynchronizedPriorityQueue extends Object implements CharPriorityQueue
| 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.
|
CharComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
|
Character |
dequeue()
Deprecated.
|
char |
dequeueChar()
Dequeues the first element from the queue.
|
void |
enqueue(char x)
Enqueues a new element.
|
void |
enqueue(Character x)
Deprecated.
|
boolean |
equals(Object o) |
Character |
first()
Deprecated.
|
char |
firstChar()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty()
Checks whether this queue is empty.
|
Character |
last()
Deprecated.
|
char |
lastChar()
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(char x)
CharPriorityQueueenqueue in interface CharPriorityQueuex - the element to enqueue.PriorityQueue.enqueue(Object)public char dequeueChar()
CharPriorityQueuedequeueChar in interface CharPriorityQueueCharPriorityQueue.dequeue()public char firstChar()
CharPriorityQueuefirstChar in interface CharPriorityQueueCharPriorityQueue.first()public char lastChar()
CharPriorityQueueThis default implementation just throws an UnsupportedOperationException.
lastChar in interface CharPriorityQueueCharPriorityQueue.last()public boolean isEmpty()
PriorityQueueThis default implementation checks whether PriorityQueue.size() is zero.
isEmpty in interface PriorityQueue<Character>public int size()
PriorityQueuesize in interface PriorityQueue<Character>public void clear()
PriorityQueueclear in interface PriorityQueue<Character>public void changed()
PriorityQueueThis default implementation just throws an UnsupportedOperationException.
changed in interface PriorityQueue<Character>public CharComparator comparator()
CharPriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface CharPriorityQueuecomparator in interface PriorityQueue<Character>PriorityQueue.comparator()@Deprecated public void enqueue(Character x)
CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface CharPriorityQueueenqueue in interface PriorityQueue<Character>x - the element to enqueue.@Deprecated public Character dequeue()
CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface CharPriorityQueuedequeue in interface PriorityQueue<Character>@Deprecated public Character first()
CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface CharPriorityQueuefirst in interface PriorityQueue<Character>@Deprecated public Character last()
CharPriorityQueueThis default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
last in interface CharPriorityQueuelast in interface PriorityQueue<Character>