|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PriorityQueue
A queue sorted by priority. Possible implementations include sorted list, binary heap, leftist heap, skew heap, etc.
Method Summary | |
---|---|
void |
clear()
Removes all elements from the queue. |
java.lang.Comparable |
deleteMin()
Removes and returns the highest priority element. |
void |
insert(java.lang.Comparable x)
Inserts an element according to its priority. |
boolean |
isEmpty()
|
int |
size()
|
Method Detail |
---|
java.lang.Comparable deleteMin() throws EmptyQueueException
EmptyQueueException
- if the queue is empty.void insert(java.lang.Comparable x) throws OverflowException
x
- the element to be inserted.
OverflowException
- if the queue is full.boolean isEmpty()
int size()
void clear()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |