package rebelsky.linear; import java.util.Comparator; /** * Linear structures in which the next value returned is * the "smallest" value. * * @author Samuel A. Rebelsky * @version 1.0 of November 2004 */ public abstract class PriorityQueue implements Linear { // +--------+-------------------------------------------------- // | Fields | // +--------+ /** * The Comparator that prioritizes elements. */ protected Comparator priority; // +--------------+-------------------------------------------- // | Constructors | // +--------------+ /** * Create a new priority queue that uses a particular * comparator to determine priority. Smaller values * have higher priority. */ protected PriorityQueue(Comparator _priority) { this.priority = _priority; } // PriorityQueue(Comparator) } // class PriorityQueue