Java Array Deep Copy deepCopy(int[][] src, int[][] dest)

Here you can find the source of deepCopy(int[][] src, int[][] dest)

Description

deep Copy

License

Open Source License

Declaration

public static void deepCopy(int[][] src, int[][] dest) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void deepCopy(int[][] src, int[][] dest) {
        for (int i = 0; i < src.length; i++) {
            System.arraycopy(src[i], 0, dest[i], 0, src[i].length);
        }/*from  w ww. j  a v a2  s . co  m*/
    }

    public static void deepCopy(int[][][] src, int[][][] dest) {
        for (int i = 0; i < src.length; i++) {
            deepCopy(src[i], dest[i]);
        }
    }

    public static <T> void deepCopy(T[][] src, T[][] dest) {
        for (int i = 0; i < src.length; i++) {
            System.arraycopy(src[i], 0, dest[i], 0, src[i].length);
        }
    }
}

Related

  1. deepClone(int[][] source)
  2. deepCopy(byte[] org)
  3. deepCopy(double[][] in)
  4. deepCopy(final String s)
  5. deepCopy(int[] array)
  6. deepCopy(Object objectArray)
  7. deepCopy2DArray(float[][] a)
  8. deepCopyOf(double[][] src)