private void siftUpComparable(int i, E x) {
        Comparable<? super E> key = (Comparable<? super E>)x;
        while (i > 0) {
            int parent = (i - 1) >>> 1;
            Object e = queue[parent];
            if (key.compareTo((E) e) < 0) {
                queue[i] = e;
                i = parent;
            }
            else {
                break;
            }
        }
        queue[i] = x; // !!!
    }