@Test public void testCopyFromStringArray() { ArrayCopyUtils.copy(STRING_ARRAY, INT_BUFFER, COPY_LENGTH); ArrayCopyUtils.copy(STRING_ARRAY, LONG_BUFFER, COPY_LENGTH); ArrayCopyUtils.copy(STRING_ARRAY, FLOAT_BUFFER, COPY_LENGTH); ArrayCopyUtils.copy(STRING_ARRAY, DOUBLE_BUFFER, COPY_LENGTH); for (int i = 0; i < COPY_LENGTH; i++) { Assert.assertEquals(INT_BUFFER[i], Integer.parseInt(STRING_ARRAY[i])); Assert.assertEquals(LONG_BUFFER[i], Long.parseLong(STRING_ARRAY[i])); Assert.assertEquals(FLOAT_BUFFER[i], Float.parseFloat(STRING_ARRAY[i])); Assert.assertEquals(DOUBLE_BUFFER[i], Double.parseDouble(STRING_ARRAY[i])); } }
public static void copy(int[] src, long[] dest, int length) { for (int i = 0; i < length; i++) { dest[i] = src[i]; } }
ArrayCopyUtils { public static void copy(int[] src, long[] dest, int length) { for (int i = 0; i < length; i++) { dest[i] = src[i]; } } }
ArrayCopyUtils { public static void copy(int[] src, long[] dest, int length) { for (int i = 0; i < length; i++) { dest[i] = src[i]; } } private  ArrayCopyUtils(); }
ArrayCopyUtils { public static void copy(int[] src, long[] dest, int length) { for (int i = 0; i < length; i++) { dest[i] = src[i]; } } private  ArrayCopyUtils(); static void copy(int[] src, long[] dest, int length); static void copy(int[] src, float[] dest, int length); static void copy(int[] src, double[] dest, int length); static void copy(int[] src, String[] dest, int length); static void copy(long[] src, int[] dest, int length); static void copy(long[] src, float[] dest, int length); static void copy(long[] src, double[] dest, int length); static void copy(long[] src, String[] dest, int length); static void copy(float[] src, int[] dest, int length); static void copy(float[] src, long[] dest, int length); static void copy(float[] src, double[] dest, int length); static void copy(float[] src, String[] dest, int length); static void copy(double[] src, int[] dest, int length); static void copy(double[] src, long[] dest, int length); static void copy(double[] src, float[] dest, int length); static void copy(double[] src, String[] dest, int length); static void copy(String[] src, int[] dest, int length); static void copy(String[] src, long[] dest, int length); static void copy(String[] src, float[] dest, int length); static void copy(String[] src, double[] dest, int length); static void copy(String[] src, byte[][] dest, int length); static void copy(byte[][] src, String[] dest, int length); }
ArrayCopyUtils { public static void copy(int[] src, long[] dest, int length) { for (int i = 0; i < length; i++) { dest[i] = src[i]; } } private  ArrayCopyUtils(); static void copy(int[] src, long[] dest, int length); static void copy(int[] src, float[] dest, int length); static void copy(int[] src, double[] dest, int length); static void copy(int[] src, String[] dest, int length); static void copy(long[] src, int[] dest, int length); static void copy(long[] src, float[] dest, int length); static void copy(long[] src, double[] dest, int length); static void copy(long[] src, String[] dest, int length); static void copy(float[] src, int[] dest, int length); static void copy(float[] src, long[] dest, int length); static void copy(float[] src, double[] dest, int length); static void copy(float[] src, String[] dest, int length); static void copy(double[] src, int[] dest, int length); static void copy(double[] src, long[] dest, int length); static void copy(double[] src, float[] dest, int length); static void copy(double[] src, String[] dest, int length); static void copy(String[] src, int[] dest, int length); static void copy(String[] src, long[] dest, int length); static void copy(String[] src, float[] dest, int length); static void copy(String[] src, double[] dest, int length); static void copy(String[] src, byte[][] dest, int length); static void copy(byte[][] src, String[] dest, int length);  }