PriorityQueue<java.lang.Short>, ShortPriorityQueuepublic static class ShortPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements ShortPriorityQueue
| 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.
|
ShortComparator |
comparator() |
Returns the comparator associated with this priority queue, or null if it
uses its elements' natural ordering.
|
java.lang.Short |
dequeue() |
Deprecated.
|
short |
dequeueShort() |
Dequeues the first element from the queue.
|
void |
enqueue(short x) |
Enqueues a new element.
|
void |
enqueue(java.lang.Short x) |
Deprecated.
|
boolean |
equals(java.lang.Object o) |
|
java.lang.Short |
first() |
Deprecated.
|
short |
firstShort() |
Returns the first element of the queue.
|
int |
hashCode() |
|
boolean |
isEmpty() |
Checks whether this queue is empty.
|
java.lang.Short |
last() |
Deprecated.
|
short |
lastShort() |
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(short x)
ShortPriorityQueueenqueue in interface ShortPriorityQueuex - the element to enqueue.PriorityQueue.enqueue(Object)public short dequeueShort()
ShortPriorityQueuedequeueShort in interface ShortPriorityQueueShortPriorityQueue.dequeue()public short firstShort()
ShortPriorityQueuefirstShort in interface ShortPriorityQueueShortPriorityQueue.first()public short lastShort()
ShortPriorityQueue
This default implementation just throws an
UnsupportedOperationException.
lastShort in interface ShortPriorityQueueShortPriorityQueue.last()public boolean isEmpty()
PriorityQueueThis default implementation checks whether PriorityQueue.size() is zero.
isEmpty in interface PriorityQueue<java.lang.Short>public int size()
PriorityQueuesize in interface PriorityQueue<java.lang.Short>public void clear()
PriorityQueueclear in interface PriorityQueue<java.lang.Short>public void changed()
PriorityQueueThis default implementation just throws an UnsupportedOperationException.
changed in interface PriorityQueue<java.lang.Short>public ShortComparator comparator()
ShortPriorityQueue
Note that this specification strengthens the one given in
PriorityQueue.comparator().
comparator in interface PriorityQueue<java.lang.Short>comparator in interface ShortPriorityQueuePriorityQueue.comparator()@Deprecated public void enqueue(java.lang.Short x)
ShortPriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface PriorityQueue<java.lang.Short>enqueue in interface ShortPriorityQueuex - the element to enqueue.@Deprecated public java.lang.Short dequeue()
ShortPriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface PriorityQueue<java.lang.Short>dequeue in interface ShortPriorityQueue@Deprecated public java.lang.Short first()
ShortPriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface PriorityQueue<java.lang.Short>first in interface ShortPriorityQueue@Deprecated public java.lang.Short last()
ShortPriorityQueueThis default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
last in interface PriorityQueue<java.lang.Short>last in interface ShortPriorityQueuepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object