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 sorted set, or null if it uses its elements' natural ordering.
|
Character |
dequeue()
Dequeues the first element from the queue.
|
char |
dequeueChar()
Dequeues the first element from the queue.
|
void |
enqueue(char x)
Enqueues a new element.
|
void |
enqueue(Character x)
Enqueues a new element.
|
Character |
first()
Returns the first element of the queue.
|
char |
firstChar()
Returns the first element of the queue.
|
boolean |
isEmpty()
Checks whether the queue is empty.
|
Character |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
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.public char dequeueChar()
CharPriorityQueuedequeueChar in interface CharPriorityQueuepublic char firstChar()
CharPriorityQueuefirstChar in interface CharPriorityQueuepublic char lastChar()
CharPriorityQueuelastChar in interface CharPriorityQueuepublic boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<Character>public int size()
PriorityQueuesize in interface PriorityQueue<Character>public void clear()
PriorityQueueclear in interface PriorityQueue<Character>public void changed()
PriorityQueuechanged 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>null if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(Character x)
PriorityQueueenqueue in interface PriorityQueue<Character>x - the element to enqueue..public Character dequeue()
PriorityQueuedequeue in interface PriorityQueue<Character>public Character first()
PriorityQueuefirst in interface PriorityQueue<Character>public Character last()
PriorityQueuelast in interface PriorityQueue<Character>