@Test public void testTail() { assertThat(tail(EMPTY_STRING_ARRAY), is(EMPTY_STRING_ARRAY)); assertThat(tail(create("a", "b", "c")), is(create("b", "c"))); assertThat(tail(create("a")), is(EMPTY_STRING_ARRAY)); }
public static String[] tail(String[] args) { if (args.length == 0) { return EMPTY_STRING_ARRAY; } else { return Arrays.copyOfRange(args, 1, args.length); } }
Collection { public static String[] tail(String[] args) { if (args.length == 0) { return EMPTY_STRING_ARRAY; } else { return Arrays.copyOfRange(args, 1, args.length); } } }
Collection { public static String[] tail(String[] args) { if (args.length == 0) { return EMPTY_STRING_ARRAY; } else { return Arrays.copyOfRange(args, 1, args.length); } } private  Collection(); }
Collection { public static String[] tail(String[] args) { if (args.length == 0) { return EMPTY_STRING_ARRAY; } else { return Arrays.copyOfRange(args, 1, args.length); } } private  Collection(); static String[] tail(String[] args); @SafeVarargs static T[] create(T... args); static String join(List<T> list, String separator, Function<T, String> function); static String join(List<String> list, String separator); }
Collection { public static String[] tail(String[] args) { if (args.length == 0) { return EMPTY_STRING_ARRAY; } else { return Arrays.copyOfRange(args, 1, args.length); } } private  Collection(); static String[] tail(String[] args); @SafeVarargs static T[] create(T... args); static String join(List<T> list, String separator, Function<T, String> function); static String join(List<String> list, String separator);  }