|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A PriorityQueue is an explicit priority version of a prioritized dispenser.
Method Summary | |
void |
add(java.lang.Object dat,
java.lang.Object pri)
pq.add(dat, pri) adds dat to pq with priority pri. |
void |
clear()
pq.clear() removes all entries from pq. |
java.lang.Object |
data()
pq.data() returns the highest priority data in pq. |
java.util.Iterator |
iterator()
pq.iterator() returns an iterator for the entries of pq. |
boolean |
more()
pq.more() returns true if there are more entries in pq. |
java.lang.Object |
priority()
pq.priority() returns the priority of the highest priority entry in pq. |
void |
remove()
pq.remove() removes the highest priority entry from pq. |
int |
size()
pq.size() returns the number of entries in pq. |
Method Detail |
public boolean more()
public int size()
public void add(java.lang.Object dat, java.lang.Object pri)
public java.lang.Object data()
Precondition: pq.more() is true
public java.lang.Object priority()
Precondition: pq.more() is true
public void remove()
Precondition: pq.more() is true
public void clear()
public java.util.Iterator iterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |