|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PriorityQueue
PriorityQueue interface. Some priority queues may support a decreaseKey operation, but this is considered an advanced operation. If so, a Position is returned by insert. Note that all "matching" is based on the compareTo method.
Nested Class Summary | |
---|---|
static interface |
PriorityQueue.Position
The Position interface represents a type that can be used for the decreaseKey operation. |
Method Summary | |
---|---|
ComparableJ2me |
deleteMin()
Remove the smallest item from the priority queue. |
ComparableJ2me |
findMin()
Find the smallest item in the priority queue. |
PriorityQueue.Position |
insert(ComparableJ2me x)
Insert into the priority queue, maintaining heap order. |
boolean |
isEmpty()
Test if the priority queue is logically empty. |
void |
makeEmpty()
Make the priority queue logically empty. |
int |
size()
Returns the size. |
Method Detail |
---|
PriorityQueue.Position insert(ComparableJ2me x) throws Error
x
- the item to insert.
Error
- if x is not of the correct type or null.ComparableJ2me findMin() throws Error
Error
- if the heap is empty.ComparableJ2me deleteMin() throws Error
Error
- if empty.boolean isEmpty()
void makeEmpty()
int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |