@Test public void testSort() { long[] inputArray1 = { 2, 2, 4, 6, 8, 15 }; long[] inputArray2 = { 0, 0, 1, 3, 7, 9, 10, 11 }; long[] result = ArrayUtil.sort(inputArray1, inputArray2); Assert.assertArrayEquals(new long[] {0, 0, 1, 2, 2, 3, 4, 6, 7, 8, 9, 10, 11, 15}, result); result = ArrayUtil.sort(inputArray1, new long[]{}); Assert.assertArrayEquals(inputArray1, result); result = ArrayUtil.sort(new long[]{}, inputArray2); Assert.assertArrayEquals(inputArray2, result); }
public static long[] sort(long left[], long right[]) { long[] result = addTo(left, right); Arrays.sort(result); return result; }
ArrayUtil { public static long[] sort(long left[], long right[]) { long[] result = addTo(left, right); Arrays.sort(result); return result; } }
ArrayUtil { public static long[] sort(long left[], long right[]) { long[] result = addTo(left, right); Arrays.sort(result); return result; } private  ArrayUtil(); }
ArrayUtil { public static long[] sort(long left[], long right[]) { long[] result = addTo(left, right); Arrays.sort(result); return result; } private  ArrayUtil(); static Long[] toLongArr(String[] strArr); static Long[] toLongArr(long[] longArr); static long[] toRawLongArr(String[] strArr); static int[] toRawIntArr(String strArr[]); static long[] toLongArr(Collection<Long> ids); static int[] toIntArr(Collection<Integer> ids); static String[] splitSimpleString(String str); static String toSimpleString(long a[]); static void reverse(long[] b); static void reverse(long[][] b); static long[] reverseCopy(long[] original, int newLength); static long[] reverseCopyRange(long[] original, int from, int to); static long[] removeAll(long[] sourceArray, long[] removeArray); static long[] removeAll(long[] sourceArray, Set<Long> removeSet); static long[] sort(long left[], long right[]); static void sortDesc(long[] a); static long[] intersectionOrder(long[] arr1, long[] arr2); static long[] addTo(long[] left, long[] right); static long[] addTo(long[] arr, long id); static long[] addTo(long[] arr, long id, int limit); static long[] getLimited(long[] arr, int limit); }
ArrayUtil { public static long[] sort(long left[], long right[]) { long[] result = addTo(left, right); Arrays.sort(result); return result; } private  ArrayUtil(); static Long[] toLongArr(String[] strArr); static Long[] toLongArr(long[] longArr); static long[] toRawLongArr(String[] strArr); static int[] toRawIntArr(String strArr[]); static long[] toLongArr(Collection<Long> ids); static int[] toIntArr(Collection<Integer> ids); static String[] splitSimpleString(String str); static String toSimpleString(long a[]); static void reverse(long[] b); static void reverse(long[][] b); static long[] reverseCopy(long[] original, int newLength); static long[] reverseCopyRange(long[] original, int from, int to); static long[] removeAll(long[] sourceArray, long[] removeArray); static long[] removeAll(long[] sourceArray, Set<Long> removeSet); static long[] sort(long left[], long right[]); static void sortDesc(long[] a); static long[] intersectionOrder(long[] arr1, long[] arr2); static long[] addTo(long[] left, long[] right); static long[] addTo(long[] arr, long id); static long[] addTo(long[] arr, long id, int limit); static long[] getLimited(long[] arr, int limit);  }