|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Protocol for priority queues.
| Method Summary | |
Object |
deleteMin()
Remove the smallest item from the priority queue. |
Object |
findMin()
Find the smallest item in the priority queue. |
int |
insert(Object x)
Insert into the priority queue. |
boolean |
isEmpty()
Test if the priority queue is logically empty. |
void |
makeEmpty()
Make the priority queue logically empty. |
void |
toss(Object x)
Insert into the priority queue quickly, ignore the PriorityQueue validity Duplicates are allowed. |
void |
validate()
Validate the priority queue. |
| Method Detail |
public int insert(Object x)
x - the item to insert.
public Object findMin()
throws Underflow
Underflow - if the priority queue is empty.
public Object deleteMin()
throws Underflow
Underflow - if the priority queue is empty.public boolean isEmpty()
public void makeEmpty()
public void toss(Object x)
x - the item to insert.public void validate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||