@Test public void testSort_WithRefComparator() { String[] strings = {"x", "y", "z", "a", "x"}; IntComparator comparator = (i1, i2) -> strings[i1 - 1].compareTo(strings[i2 - 1]); int[] ints = {1, 2, 3, 4, 5}; IntTimSort.sort(ints, comparator); assertArrayEquals(new int[]{4, 1, 5, 2, 3}, ints); }
public static void sort(int[] a, IntComparator c) { sort(a, 0, a.length, c); }
IntTimSort { public static void sort(int[] a, IntComparator c) { sort(a, 0, a.length, c); } }
IntTimSort { public static void sort(int[] a, IntComparator c) { sort(a, 0, a.length, c); } private  IntTimSort(int[] a, IntComparator c); }
IntTimSort { public static void sort(int[] a, IntComparator c) { sort(a, 0, a.length, c); } private  IntTimSort(int[] a, IntComparator c); static void sort(int[] a, IntComparator c); static void sort(int[] a, int lo, int hi, IntComparator c); }
IntTimSort { public static void sort(int[] a, IntComparator c) { sort(a, 0, a.length, c); } private  IntTimSort(int[] a, IntComparator c); static void sort(int[] a, IntComparator c); static void sort(int[] a, int lo, int hi, IntComparator c);  }