final int length = arr.length;
Integer[] indices = makeIndexArray(length);
Arrays.sort(indices, new IntComparator(arr, ascending));
-
+
/*
* Copy the array values as per the sorted indices
*/
sortedInts[i] = arr[indices[i]];
sortedObjects[i] = s[indices[i]];
}
-
+
/*
* And copy the sorted values back into the arrays
*/
final int length = arr.length;
Integer[] indices = makeIndexArray(length);
Arrays.sort(indices, new ExternalComparator(arr, ascending));
-
+
/*
* Copy the array values as per the sorted indices
*/
sortedStrings[i] = arr[indices[i]];
sortedObjects[i] = s[indices[i]];
}
-
+
/*
* And copy the sorted values back into the arrays
*/
final int length = arr.length;
Integer[] indices = makeIndexArray(length);
Arrays.sort(indices, new DoubleComparator(arr, ascending));
-
+
/*
* Copy the array values as per the sorted indices
*/
sortedDoubles[i] = arr[indices[i]];
sortedObjects[i] = s[indices[i]];
}
-
+
/*
* And copy the sorted values back into the arrays
*/