/** * Base interface for priority queue implementations. */ public interface PriorityQueue { /** * Returns true if priority queue has no elements * * @return true if the priority queue has no elements */ public boolean isEmpty(); /** * Returns a reference to the minimum element in the priority queue * * @return reference to the minimum element in the priority queue. */ public Object findMin(); /** * Inserts a new object to the priority queue * * @param x Object to be inserted into the priority queue. */ public void insert(Object x); /** * Removes the minimum element from the priority queue. * * @return reference to the minimum element. */ public Object deleteMin(); /** * Erases all elements from the priority queue. */ public void makeEmpty(); }