|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for a priority queue.
The remove method returns an item of highest priority from the queue.
If distinct items are of the same priority, an implementation is not obliged to return them in any particular order, unless it declares otherwise.
| Method Summary | |
void |
add(java.lang.Comparable item)
Adds an item to the queue. |
boolean |
isEmpty()
Indicates the status of the queue. |
java.lang.Comparable |
remove()
Removes an item of highest priority from the queue. |
int |
size()
Returns the current size of the queue |
| Method Detail |
public boolean isEmpty()
true if the queue is empty.public int size()
public void add(java.lang.Comparable item)
item - the item to be added.public java.lang.Comparable remove()
NoSuchElementException - if the queue is empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||