|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.util.PriorityQueue
public class PriorityQueue
Implements a priority aware queue (FIFO structure).
Constructor Summary | |
---|---|
PriorityQueue()
Constructs a queue with 5 priority levels. |
|
PriorityQueue(int levelNb)
Constucts a queue with the specified number of priority levels. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
Adds an element to the queue. |
boolean |
add(java.lang.Object o,
int priority)
Adds an element to the queue with the specified priority. |
boolean |
addAll(java.util.Collection c)
Adds all the elments of a collection to the queue. |
void |
clear()
Clears all the queue. |
boolean |
contains(java.lang.Object o)
Checks if the object is in the queue. |
boolean |
containsAll(java.util.Collection c)
Checks if all the element are in the queue. |
boolean |
equals(java.lang.Object o)
Checks if the queue is equals to another one. |
boolean |
isEmpty()
Checks if the queue is empty. |
java.util.Iterator |
iterator()
Iterator without a valid remove method ! |
java.lang.Object |
popFirst()
Pops the first var in the queue. |
boolean |
remove(java.lang.Object o)
Removes the specified object. |
boolean |
removeAll(java.util.Collection c)
Removes all the specified objects. |
boolean |
retainAll(java.util.Collection c)
Not yet implemented. |
int |
size()
Returns the size of the queue. |
java.lang.Object[] |
toArray()
Returns an array with all the objects in the queue. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Not yet implemented. |
void |
updatePriority(java.lang.Object o)
Updates the location of the element in the list. |
void |
updatePriority(java.lang.Object o,
int priority)
Updates the location of the element in the list with the specified priority. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PriorityQueue(int levelNb)
public PriorityQueue()
Method Detail |
---|
public boolean add(java.lang.Object o)
IPrioritizable
object.
public boolean add(java.lang.Object o, int priority)
public boolean addAll(java.util.Collection c)
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection c)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean isEmpty()
public java.util.Iterator iterator()
public java.lang.Object popFirst()
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection c)
public boolean retainAll(java.util.Collection c)
public int size()
public java.lang.Object[] toArray()
public java.lang.Object[] toArray(java.lang.Object[] a)
public void updatePriority(java.lang.Object o)
IPrioritizable
.
public void updatePriority(java.lang.Object o, int priority)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |