@Test public void sliceテスト3() { String[] actual = Arrays.slice(Arrays.gen("a", "b", "c"), 1, 1); assertNotNull(actual); assertEquals(1, actual.length); assertEquals("b", actual[0]); }
public static <T> T[] slice(T[] slicee, int start) { Args.checkNotNull(slicee); if (slicee.length == 0) return slicee; Args.checkPositiveOrZero(start); return slice(slicee, start, slicee.length - start); }
Arrays { public static <T> T[] slice(T[] slicee, int start) { Args.checkNotNull(slicee); if (slicee.length == 0) return slicee; Args.checkPositiveOrZero(start); return slice(slicee, start, slicee.length - start); } }
Arrays { public static <T> T[] slice(T[] slicee, int start) { Args.checkNotNull(slicee); if (slicee.length == 0) return slicee; Args.checkPositiveOrZero(start); return slice(slicee, start, slicee.length - start); } private  Arrays(); }
Arrays { public static <T> T[] slice(T[] slicee, int start) { Args.checkNotNull(slicee); if (slicee.length == 0) return slicee; Args.checkPositiveOrZero(start); return slice(slicee, start, slicee.length - start); } private  Arrays(); static T[] gen(T... elements); @SuppressWarnings("unchecked") static T[] gen(int size, GenCall<T> generator); static int contain(T[] t, T suspect); static Iterator<T> iterator(T... elements); @SuppressWarnings("unchecked") static T[] merge(final T[] former, final T... latter); static T[] each(T[] elements, EachCall<T> callback); @SuppressWarnings("unchecked") static T[] collect(T[] elements, CollectCall<T> callback); @SuppressWarnings("unchecked") static Map<String, T[]> group(T[] elements, GroupCall<T> callback); static boolean isEmpty(T[] suspect); static boolean isNotEmpty(T[] suspect); static T[] slice(T[] slicee, int start); @SuppressWarnings("unchecked") static T[] slice(T[] slicee, int start, int length); }
Arrays { public static <T> T[] slice(T[] slicee, int start) { Args.checkNotNull(slicee); if (slicee.length == 0) return slicee; Args.checkPositiveOrZero(start); return slice(slicee, start, slicee.length - start); } private  Arrays(); static T[] gen(T... elements); @SuppressWarnings("unchecked") static T[] gen(int size, GenCall<T> generator); static int contain(T[] t, T suspect); static Iterator<T> iterator(T... elements); @SuppressWarnings("unchecked") static T[] merge(final T[] former, final T... latter); static T[] each(T[] elements, EachCall<T> callback); @SuppressWarnings("unchecked") static T[] collect(T[] elements, CollectCall<T> callback); @SuppressWarnings("unchecked") static Map<String, T[]> group(T[] elements, GroupCall<T> callback); static boolean isEmpty(T[] suspect); static boolean isNotEmpty(T[] suspect); static T[] slice(T[] slicee, int start); @SuppressWarnings("unchecked") static T[] slice(T[] slicee, int start, int length);  }