import java.util.*; /** This class simply implements a priority queue under that name, for consistency with the Weiss implementation of Kruskal's algorithm. It simply inherits from BinaryHeap without adding any functionality other than a size() method. */ public class PriorityQueue extends BinaryHeap { /** creates an empty priority queue of a given capacity @param capacity the capacity */ public PriorityQueue(int capacity) { super(capacity); } /** creates a priority queue and adds all elements of a given vector to the queue. The capacity of the priority queue will be the size of the vector -- no elements are expected to be added @param v the vector */ public PriorityQueue(Vector v) { super(v); } public int size() { return this.currentSize; } }