/** * Wraps a given array in a queue using a given comparator. * * <p> * The queue returned by this method will be backed by the given array. The * first {@code size} element of the array will be rearranged so to form a heap * (this is more efficient than enqueing the elements of {@code a} one by one). * * @param a * an array. * @param size * the number of elements to be included in the queue. * @param c * the comparator used in this queue, or {@code null} for the natural * order. */ public ObjectHeapPriorityQueue(final K[] a, int size, final Comparator<? super K> c) { this(c); this.heap = a; this.size = size; ObjectHeaps.makeHeap(a, size, c); } /**