|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.dsi.fastutil.ints.IntPriorityQueues.SynchronizedPriorityQueue
public static class IntPriorityQueues.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. |
IntComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering. |
Integer |
dequeue()
Dequeues the PriorityQueue.first() element from the queue. |
int |
dequeueInt()
Dequeues the first element from the queue. |
void |
enqueue(int x)
Enqueues a new element. |
void |
enqueue(Integer x)
Enqueues a new element. |
Integer |
first()
Returns the first element of the queue. |
int |
firstInt()
Returns the front element of the queue. |
boolean |
isEmpty()
Checks whether the queue is empty. |
Integer |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation). |
int |
lastInt()
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(int x)
IntPriorityQueue
enqueue in interface IntPriorityQueuex - the element to enqueue..public int dequeueInt()
IntPriorityQueue
dequeueInt in interface IntPriorityQueuepublic int firstInt()
IntPriorityQueue
firstInt in interface IntPriorityQueuepublic int lastInt()
IntPriorityQueue
lastInt in interface IntPriorityQueuepublic boolean isEmpty()
PriorityQueue
isEmpty in interface PriorityQueue<Integer>public int size()
PriorityQueue
size in interface PriorityQueue<Integer>public void clear()
PriorityQueue
clear in interface PriorityQueue<Integer>public void changed()
PriorityQueue
changed in interface PriorityQueue<Integer>public IntComparator comparator()
IntPriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface IntPriorityQueuecomparator in interface PriorityQueue<Integer>null if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(Integer x)
PriorityQueue
enqueue in interface PriorityQueue<Integer>x - the element to enqueue..public Integer dequeue()
PriorityQueuePriorityQueue.first() element from the queue.
dequeue in interface PriorityQueue<Integer>public Integer first()
PriorityQueue
first in interface PriorityQueue<Integer>public Integer last()
PriorityQueue
last in interface PriorityQueue<Integer>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||