|
|||||||||
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. |
java.util.Comparator |
comparator()
Returns the comparator associated with this queue, or null if it uses its elements' natural ordering. |
java.lang.Object |
dequeue()
Dequeues the PriorityQueue.first() element from the queue. |
void |
enqueue(java.lang.Object o)
Enqueues a new element. |
java.lang.Object |
first()
Returns the first element of the queue. |
boolean |
isEmpty()
Checks whether the queue is empty. |
java.lang.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(java.lang.Object o)
PriorityQueue
o
- the element to enqueue..public java.lang.Object dequeue()
PriorityQueue
PriorityQueue.first()
element from the queue.
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue
isEmpty
in class AbstractPriorityQueue
public int size()
PriorityQueue
public void clear()
PriorityQueue
public java.lang.Object first()
PriorityQueue
public java.lang.Object last()
PriorityQueue
last
in interface PriorityQueue
last
in class AbstractPriorityQueue
public void changed()
PriorityQueue
changed
in interface PriorityQueue
changed
in class AbstractPriorityQueue
public java.util.Comparator comparator()
PriorityQueue
null
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 |