|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines a collection for priority queues, which can insert, peek and pop.
This interface is now replaced by the Buffer interface.
| Method Summary | |
void |
clear()
Deprecated. Clear all elements from queue. |
void |
insert(Object element)
Deprecated. Insert an element into queue. |
boolean |
isEmpty()
Deprecated. Test if queue is empty. |
Object |
peek()
Deprecated. Return element on top of heap but don't remove it. |
Object |
pop()
Deprecated. Return element on top of heap and remove it. |
| Method Detail |
public void clear()
public boolean isEmpty()
public void insert(Object element)
element - the element to be inserted
ClassCastException - if the specified element's
type prevents it from being compared to other items in the queue to
determine its relative priority.public Object peek()
NoSuchElementException - if isEmpty() == truepublic Object pop()
NoSuchElementException - if isEmpty() == true
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||