@Test public void testConcatObjectArrayArray_01() { Object[] inputArray_1 = {"This", "is"}; Object[] inputArray_2 = {"a", "contact", "test"}; Object[] expected = {"This", "is", "a", "contact", "test"}; Object[] actualResult = ArrayUtil.concat(inputArray_1, inputArray_2); assertNotNull(actualResult); assertEquals(5, actualResult.length); assertArrayEquals(actualResult, expected); }
public static String[] concat(String[]... arrays) { int x = 0; for (int i = 0; i < arrays.length; ++i) x += arrays[i].length; String[] result = new String[x]; x = 0; for (int i = 0; i < arrays.length; ++i) { System.arraycopy(arrays[i], 0, result, x, arrays[i].length); x += arrays[i].length; } return result; }
ArrayUtil { public static String[] concat(String[]... arrays) { int x = 0; for (int i = 0; i < arrays.length; ++i) x += arrays[i].length; String[] result = new String[x]; x = 0; for (int i = 0; i < arrays.length; ++i) { System.arraycopy(arrays[i], 0, result, x, arrays[i].length); x += arrays[i].length; } return result; } }
ArrayUtil { public static String[] concat(String[]... arrays) { int x = 0; for (int i = 0; i < arrays.length; ++i) x += arrays[i].length; String[] result = new String[x]; x = 0; for (int i = 0; i < arrays.length; ++i) { System.arraycopy(arrays[i], 0, result, x, arrays[i].length); x += arrays[i].length; } return result; } private  ArrayUtil(); }
ArrayUtil { public static String[] concat(String[]... arrays) { int x = 0; for (int i = 0; i < arrays.length; ++i) x += arrays[i].length; String[] result = new String[x]; x = 0; for (int i = 0; i < arrays.length; ++i) { System.arraycopy(arrays[i], 0, result, x, arrays[i].length); x += arrays[i].length; } return result; } private  ArrayUtil(); static Integer[] box(int[] ints); @SuppressWarnings("unchecked") static T[] toArray(Enumeration<T> e); static String[] stringify(T[] array); static String[] stringify(Collection<T> collection); static String[] stringify(T[] array, Stringifier<T> stringifier, Object... options); static String[] stringify(Collection<T> collection, Stringifier<T> stringifier,
			Object... options); static String[] translate(String[] array, Translator translator); static String[] translate(String[] strings, Translator translator, boolean overwrite,
			Object... options); static Object[] convert(Object[] array, RawConverter converter); static Object[] convert(Object[] objects, RawConverter converter, boolean overwrite,
			Object... options); static U[] convert(T[] objects, Converter<T, U> converter, Object... options); static String[] concat(String[]... arrays); static Object[] concat(Object[]... arrays); @SafeVarargs static boolean in(T obj, T... objs); static boolean in(char c, char... chars); @SafeVarargs static boolean has(T obj, T... objs); static String implode(T[] objects); static String implode(T[] objects, String separator); static String implode(T[] objects, Stringifier<T> callback, Object... options); static String implode(T[] objects, String separator, Stringifier<T> callback,
			Object... options); static boolean deepEquals(byte[] array1, byte[] array2); }
ArrayUtil { public static String[] concat(String[]... arrays) { int x = 0; for (int i = 0; i < arrays.length; ++i) x += arrays[i].length; String[] result = new String[x]; x = 0; for (int i = 0; i < arrays.length; ++i) { System.arraycopy(arrays[i], 0, result, x, arrays[i].length); x += arrays[i].length; } return result; } private  ArrayUtil(); static Integer[] box(int[] ints); @SuppressWarnings("unchecked") static T[] toArray(Enumeration<T> e); static String[] stringify(T[] array); static String[] stringify(Collection<T> collection); static String[] stringify(T[] array, Stringifier<T> stringifier, Object... options); static String[] stringify(Collection<T> collection, Stringifier<T> stringifier,
			Object... options); static String[] translate(String[] array, Translator translator); static String[] translate(String[] strings, Translator translator, boolean overwrite,
			Object... options); static Object[] convert(Object[] array, RawConverter converter); static Object[] convert(Object[] objects, RawConverter converter, boolean overwrite,
			Object... options); static U[] convert(T[] objects, Converter<T, U> converter, Object... options); static String[] concat(String[]... arrays); static Object[] concat(Object[]... arrays); @SafeVarargs static boolean in(T obj, T... objs); static boolean in(char c, char... chars); @SafeVarargs static boolean has(T obj, T... objs); static String implode(T[] objects); static String implode(T[] objects, String separator); static String implode(T[] objects, Stringifier<T> callback, Object... options); static String implode(T[] objects, String separator, Stringifier<T> callback,
			Object... options); static boolean deepEquals(byte[] array1, byte[] array2);  }