import java.util.Comparator;
import java.util.NoSuchElementException;


public interface PriorityQueue<T> {

	/**
	  * Get the number of elements in the PriorityQueue
	  * @return the number of elements in the PriorityQueue
	  */
	public int size();
	
	/**
	  * Tests if the PriotityQueue has no elements
	  * @returns true if empty; false otherwise
	  */
	boolean isEmpty();

	/**
	  * Inserts an Object into the PriorityQueue
	  * @param the element to be inserted
	  */
	void add(T x);

	/**
	  * Gets the minimum element in the PriorityQueue
	  * @return the minimum element
	  */
	T getMin() throws NoSuchElementException;


	/**
	  * removes the minimum element from the PriorityQueue
	  * @return the deleted element
	  */
	T removeMin() throws NoSuchElementException;
	
	/**
	  * Removes all elements from the PriorityQueue
	  */
	void removeAll();

	/**
	  * Get the priority object used in the PriorityQueue
	  * @return the priority as a comparator object
	  */
	public Comparator<? super T> priority();
	
	/**
	  * Returns a String representation of the list the objects in the Priority Queue
	  * @return a string of the objects in the Priority Queue
	  */
	public String toString();

} // end PriorityQueue
