/* Generic interface for a Priority Queue. Each inserted object has a "priority" which is determined by the .compareTo function. If a.compareTo(b)>0 then a has higher priority than b. */ public interface PriorityQ { int size(); // number of values currently in queue boolean add(T x); // insert new value into queue, returns true if x!=null T poll(); // returns and deletes the value with the highest priority. // returns null if queue is empty T peek(); // returns the value with highest priority, without delete, // returns null if queue is empty boolean contains(T x); //if x is contained in queue using .equals() boolean remove(T x); // removes a single instance of x from queue // returns false if nothing was removed }//interface PriorityQ // March 2021