code: public static <T> int[] mergesort(T[] input, int start, int length, Comparator<? super T> comparator) {
      return mergesort(start, length, new IndirectComparator.DelegatingComparator<T>(input, comparator));
    }
docs: Returns the order of elements between indices <code>start</code> and
  <code>length</code>, as indicated by the given <code>comparator</code>.
  This method is equivalent to calling
  {@link #mergesort(int, int, IndirectComparator)} with
  {@link IndirectComparator.DelegatingComparator}.
  <p>
  This routine uses merge sort. It is guaranteed to be stable.
  </p>