public static <T> int[] sort(
		final T[] array,
		final java.util.Comparator<? super T> comparator
	) {
		return sort(
			array, array.length,
			(a, i, j) -> comparator.compare(a[i], a[j])
		);
	}
Sorting the given array by creating an index lookup array.

@see #sort(Object, int, Comparator)

@param <T> the array element type
@param array the array to sort
@param comparator the array element comparator
@return the <em>sorted</em> index lookup array
@throws NullPointerException if one of the arguments is {@code null}
jenetics/src/main/java/io/jenetics/util/ProxySorter.java