void (Comparator<? super Attribute> comp) { if (comp == null) { comp = ATTRIBUTE_NATURAL; } final int sz = size; int[] indexes = new int[sz]; for (int i = 0; i < sz; i++) { final int ip = binarySearch(indexes, i, i, comp); if (ip < i) { System.arraycopy(indexes, ip, indexes, ip + 1, i - ip); } indexes[ip] = i; } sortInPlace(indexes); }