|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
T - the type of data the queue stores.public interface PriorityQueue<T extends java.lang.Comparable<? super T>>
An interface for the Priority Queue ADT. Note that relative priority of elements is determined with the T.compareTo() method.
| Method Summary | |
|---|---|
void |
add(T item)
Adds the given item to the queue. |
void |
clear()
Removes all items from the queue. |
boolean |
isEmpty()
Returns true if the queue is empty. |
T |
peek()
Returns the maximum item in the queue, without removing it. |
T |
remove()
Removes the maximum item from the queue, and returns it. |
| Method Detail |
|---|
void add(T item)
T remove()
T peek()
boolean isEmpty()
void clear()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||