|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
E - the type of elements held in this queuepublic interface PriorityQueue<E extends java.lang.Comparable<? super E>>
Interface for a priority queue of elements of type E.
Elements of type E must implement the Comparable interface in their defining class or in some superclass.
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(E item)
Adds an item to the queue. |
boolean |
isEmpty()
Indicates the status of the queue. |
E |
remove()
Removes an item of highest priority from the queue. |
int |
size()
Returns the current size of the queue |
| Method Detail |
|---|
boolean isEmpty()
true if the queue is empty.int size()
void add(E item)
item - the item to be added.E remove()
NoSuchElementException - if the queue is empty.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||