|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.longs.LongPriorityQueues.SynchronizedPriorityQueue
public static class LongPriorityQueues.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. |
LongComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering. |
java.lang.Long |
dequeue()
Dequeues the PriorityQueue.first() element from the queue. |
long |
dequeueLong()
Dequeues the first element from the queue. |
void |
enqueue(long x)
Enqueues a new element. |
void |
enqueue(java.lang.Long x)
Enqueues a new element. |
java.lang.Long |
first()
Returns the first element of the queue. |
long |
firstLong()
Returns the front element of the queue. |
boolean |
isEmpty()
Checks whether the queue is empty. |
java.lang.Long |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation). |
long |
lastLong()
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(long x)
LongPriorityQueue
enqueue
in interface LongPriorityQueue
x
- the element to enqueue..public long dequeueLong()
LongPriorityQueue
dequeueLong
in interface LongPriorityQueue
public long firstLong()
LongPriorityQueue
firstLong
in interface LongPriorityQueue
public long lastLong()
LongPriorityQueue
lastLong
in interface LongPriorityQueue
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue<java.lang.Long>
public int size()
PriorityQueue
size
in interface PriorityQueue<java.lang.Long>
public void clear()
PriorityQueue
clear
in interface PriorityQueue<java.lang.Long>
public void changed()
PriorityQueue
changed
in interface PriorityQueue<java.lang.Long>
public LongComparator comparator()
LongPriorityQueue
Note that this specification strengthens the one given in PriorityQueue.comparator()
.
comparator
in interface LongPriorityQueue
comparator
in interface PriorityQueue<java.lang.Long>
null
if it uses its elements' natural ordering.PriorityQueue.comparator()
public void enqueue(java.lang.Long x)
PriorityQueue
enqueue
in interface PriorityQueue<java.lang.Long>
x
- the element to enqueue..public java.lang.Long dequeue()
PriorityQueue
PriorityQueue.first()
element from the queue.
dequeue
in interface PriorityQueue<java.lang.Long>
public java.lang.Long first()
PriorityQueue
first
in interface PriorityQueue<java.lang.Long>
public java.lang.Long last()
PriorityQueue
last
in interface PriorityQueue<java.lang.Long>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |