CharPriorityQueue, PriorityQueue<java.lang.Character>public static class CharPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements CharPriorityQueue
| Modifier and Type | Method | 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.
|
java.lang.Character |
dequeue() |
Deprecated.
|
char |
dequeueChar() |
Dequeues the first element from the queue.
|
void |
enqueue(char x) |
Enqueues a new element.
|
void |
enqueue(java.lang.Character x) |
Deprecated.
|
boolean |
equals(java.lang.Object o) |
|
java.lang.Character |
first() |
Deprecated.
|
char |
firstChar() |
Returns the first element of the queue.
|
int |
hashCode() |
|
boolean |
isEmpty() |
Checks whether this queue is empty.
|
java.lang.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()
CharPriorityQueue
This 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<java.lang.Character>public int size()
PriorityQueuesize in interface PriorityQueue<java.lang.Character>public void clear()
PriorityQueueclear in interface PriorityQueue<java.lang.Character>public void changed()
PriorityQueueThis default implementation just throws an UnsupportedOperationException.
changed in interface PriorityQueue<java.lang.Character>public CharComparator comparator()
CharPriorityQueue
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface CharPriorityQueuecomparator in interface PriorityQueue<java.lang.Character>PriorityQueue.comparator()@Deprecated public void enqueue(java.lang.Character x)
CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface CharPriorityQueueenqueue in interface PriorityQueue<java.lang.Character>x - the element to enqueue.@Deprecated public java.lang.Character dequeue()
CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface CharPriorityQueuedequeue in interface PriorityQueue<java.lang.Character>@Deprecated public java.lang.Character first()
CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface CharPriorityQueuefirst in interface PriorityQueue<java.lang.Character>@Deprecated public java.lang.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<java.lang.Character>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object