|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.dsi.fastutil.AbstractPriorityQueue
it.unimi.dsi.fastutil.PriorityQueues.EmptyPriorityQueue
public static class PriorityQueues.EmptyPriorityQueue
An immutable class representing the empty priority queue.
This class may be useful to implement your own in case you subclass
PriorityQueue.
| Method Summary | |
|---|---|
void |
changed()
Notifies the queue that the first element has changed (optional operation). |
void |
clear()
Removes all elements from this queue. |
Comparator |
comparator()
Returns the comparator associated with this queue, or null if it uses its elements' natural ordering. |
Object |
dequeue()
Dequeues the PriorityQueue.first() element from the queue. |
void |
enqueue(Object o)
Enqueues a new element. |
Object |
first()
Returns the first element of the queue. |
boolean |
isEmpty()
Checks whether the queue is empty. |
Object |
last()
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void enqueue(Object o)
PriorityQueue
o - the element to enqueue..public Object dequeue()
PriorityQueuePriorityQueue.first() element from the queue.
public boolean isEmpty()
PriorityQueue
isEmpty in interface PriorityQueueisEmpty in class AbstractPriorityQueuepublic int size()
PriorityQueue
public void clear()
PriorityQueue
public Object first()
PriorityQueue
public Object last()
PriorityQueue
last in interface PriorityQueuelast in class AbstractPriorityQueuepublic void changed()
PriorityQueue
changed in interface PriorityQueuechanged in class AbstractPriorityQueuepublic Comparator comparator()
PriorityQueuenull if it uses its elements' natural ordering.
null if it uses its elements' natural ordering.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||