19 lines
505 B
Java
19 lines
505 B
Java
package priorityqueue;
|
|
|
|
import exceptions.EmptyPriorityQueueException;
|
|
import exceptions.InvalidKeyException;
|
|
|
|
/**
|
|
* Created with xgiovio.macbookair.
|
|
* User: xgiovio
|
|
* Date: 01/04/14
|
|
* Time: 16:29
|
|
*/
|
|
public interface PriorityQueue<K,V> {
|
|
public int size();
|
|
public boolean isEmpty();
|
|
public Entry<K,V> min() throws EmptyPriorityQueueException;
|
|
public Entry<K,V> insert(K key, V value) throws InvalidKeyException;
|
|
public Entry<K,V> removeMin() throws EmptyPriorityQueueException;
|
|
}
|