|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Priority Queue. Stores elements of the key-element pair type, where the key is considered as a priority value.
Method Summary | |
java.lang.Object |
extract()
Extracts the element with greater priority, i.e. with minimal key. |
void |
insert(java.lang.Object key,
java.lang.Object element)
Inserts an element with priority key in this priority queue. |
boolean |
isEmpty()
Checks whether this priority queue is empty. |
java.lang.Object |
minKey()
Reads the minimal key in this priority queue, without removing the element. |
java.lang.Object |
minKeyElement()
Reads the element with minimal key. |
int |
size()
Gets the number of entries in this priority queue. |
Method Detail |
public void insert(java.lang.Object key, java.lang.Object element)
key
- the priority value; smaller keys represent greater priority.element
- the element value;public java.lang.Object extract()
public int size()
public boolean isEmpty()
public java.lang.Object minKey()
public java.lang.Object minKeyElement()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |