public static class ShortPriorityQueues.SynchronizedPriorityQueue extends java.lang.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 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)
ShortPriorityQueue
enqueue
in interface ShortPriorityQueue
x
- the element to enqueue.PriorityQueue.enqueue(Object)
public short dequeueShort()
ShortPriorityQueue
dequeueShort
in interface ShortPriorityQueue
ShortPriorityQueue.dequeue()
public short firstShort()
ShortPriorityQueue
firstShort
in interface ShortPriorityQueue
ShortPriorityQueue.first()
public short lastShort()
ShortPriorityQueue
This default implementation just throws an UnsupportedOperationException
.
lastShort
in interface ShortPriorityQueue
ShortPriorityQueue.last()
public boolean isEmpty()
PriorityQueue
This default implementation checks whether PriorityQueue.size()
is zero.
isEmpty
in interface PriorityQueue<java.lang.Short>
public int size()
PriorityQueue
size
in interface PriorityQueue<java.lang.Short>
public void clear()
PriorityQueue
clear
in interface PriorityQueue<java.lang.Short>
public void changed()
PriorityQueue
This default implementation just throws an UnsupportedOperationException
.
changed
in interface PriorityQueue<java.lang.Short>
public ShortComparator comparator()
ShortPriorityQueue
comparator
in interface PriorityQueue<java.lang.Short>
comparator
in interface ShortPriorityQueue
PriorityQueue.comparator()
@Deprecated public void enqueue(java.lang.Short x)
ShortPriorityQueue
This default implementation delegates to the corresponding type-specific method.
enqueue
in interface PriorityQueue<java.lang.Short>
enqueue
in interface ShortPriorityQueue
x
- the element to enqueue.@Deprecated public java.lang.Short dequeue()
ShortPriorityQueue
This 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()
ShortPriorityQueue
This 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()
ShortPriorityQueue
This 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 ShortPriorityQueue
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object