public static class ShortPriorityQueues.SynchronizedPriorityQueue extends Object implements ShortPriorityQueue
| 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.
|
ShortComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
|
Short |
dequeue()
Dequeues the first element from the queue.
|
short |
dequeueShort()
Dequeues the first element from the queue.
|
void |
enqueue(short x)
Enqueues a new element.
|
void |
enqueue(Short x)
Enqueues a new element.
|
Short |
first()
Returns the first element of the queue.
|
short |
firstShort()
Returns the first element of the queue.
|
boolean |
isEmpty()
Checks whether the queue is empty.
|
Short |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
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.public short dequeueShort()
ShortPriorityQueuedequeueShort in interface ShortPriorityQueuepublic short firstShort()
ShortPriorityQueuefirstShort in interface ShortPriorityQueuepublic short lastShort()
ShortPriorityQueuelastShort in interface ShortPriorityQueuepublic boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<Short>public int size()
PriorityQueuesize in interface PriorityQueue<Short>public void clear()
PriorityQueueclear in interface PriorityQueue<Short>public void changed()
PriorityQueuechanged in interface PriorityQueue<Short>public ShortComparator comparator()
ShortPriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface PriorityQueue<Short>comparator in interface ShortPriorityQueuenull if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(Short x)
PriorityQueueenqueue in interface PriorityQueue<Short>x - the element to enqueue..public Short dequeue()
PriorityQueuedequeue in interface PriorityQueue<Short>public Short first()
PriorityQueuefirst in interface PriorityQueue<Short>public Short last()
PriorityQueuelast in interface PriorityQueue<Short>