|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.shorts.ShortPriorityQueues.SynchronizedPriorityQueue
public static class ShortPriorityQueues.SynchronizedPriorityQueue
A synchronized wrapper class for priority queues.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
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 queue, or null if it uses its elements' natural ordering. |
java.lang.Short |
dequeue()
Dequeues the PriorityQueue.first() element from the queue. |
short |
dequeueShort()
Dequeues the first element from the queue. |
void |
enqueue(short x)
Enqueues a new element. |
void |
enqueue(java.lang.Short x)
Enqueues a new element. |
java.lang.Short |
first()
Returns the first element of the queue. |
short |
firstShort()
Returns the front element of the queue. |
boolean |
isEmpty()
Checks whether the queue is empty. |
java.lang.Short |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation). |
short |
lastShort()
Returns the rear 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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Method Detail |
---|
public void enqueue(short x)
ShortPriorityQueue
enqueue
in interface ShortPriorityQueue
x
- the element to enqueue..public short dequeueShort()
ShortPriorityQueue
dequeueShort
in interface ShortPriorityQueue
public short firstShort()
ShortPriorityQueue
firstShort
in interface ShortPriorityQueue
public short lastShort()
ShortPriorityQueue
lastShort
in interface ShortPriorityQueue
public boolean isEmpty()
PriorityQueue
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
changed
in interface PriorityQueue<java.lang.Short>
public ShortComparator comparator()
PriorityQueue
null
if it uses its elements' natural ordering.
comparator
in interface PriorityQueue<java.lang.Short>
comparator
in interface ShortPriorityQueue
null
if it uses its elements' natural ordering.PriorityQueue.comparator()
public void enqueue(java.lang.Short x)
PriorityQueue
enqueue
in interface PriorityQueue<java.lang.Short>
x
- the element to enqueue..public java.lang.Short dequeue()
PriorityQueue
PriorityQueue.first()
element from the queue.
dequeue
in interface PriorityQueue<java.lang.Short>
public java.lang.Short first()
PriorityQueue
first
in interface PriorityQueue<java.lang.Short>
public java.lang.Short last()
PriorityQueue
last
in interface PriorityQueue<java.lang.Short>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |