|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PriorityQueue
Created by IntelliJ IDEA. User: pereira Date: Jun 18, 2005 Time: 7:46:46 PM Interface representing the basic methods for a priority queue.
| Method Summary | |
|---|---|
void |
changePriority(QueueElement e,
double priority)
Change the priority of queue element e to priority. |
boolean |
contains(QueueElement e)
Does the queue contain an element? |
QueueElement |
extractMin()
Remove the top element of the queue. |
void |
insert(QueueElement e)
Insert element e into the queue. |
QueueElement |
min()
Return the top element of the queue. |
int |
size()
The current size of the queue. |
QueueElement[] |
toArray()
Returns any array containing all of the elements in the queue. |
| Method Detail |
|---|
void insert(QueueElement e)
e into the queue.
e - the element to insertint size()
QueueElement min()
QueueElement extractMin()
void changePriority(QueueElement e,
double priority)
e to priority.
The element's position in the queue is adjusted as needed.
e - the element that has been changedpriority - the new priorityboolean contains(QueueElement e)
e - the element
QueueElement[] toArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||