|
net.datastructures - version 5.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface PriorityQueue<K,V>
Interface for the priority queue ADT
| Method Summary | |
|---|---|
Entry<K,V> |
insert(K key,
V value)
Inserts a key-value pair and return the entry created. |
boolean |
isEmpty()
Returns whether the priority queue is empty. |
Entry<K,V> |
min()
Returns but does not remove an entry with minimum key. |
Entry<K,V> |
removeMin()
Removes and returns an entry with minimum key. |
int |
size()
Returns the number of items in the priority queue. |
| Method Detail |
|---|
int size()
boolean isEmpty()
Entry<K,V> min()
throws EmptyPriorityQueueException
EmptyPriorityQueueException
Entry<K,V> insert(K key,
V value)
throws InvalidKeyException
InvalidKeyException
Entry<K,V> removeMin()
throws EmptyPriorityQueueException
EmptyPriorityQueueException
|
net.datastructures - version 5.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||