List of utility methods to do Array Clone
T[] | clone(T[] array) Shallow clones an array returning a typecast result and handling The objects in the array are not cloned, thus there is no special handling for multi-dimensional arrays. This method returns if (array == null) { return null; return array.clone(); |
boolean[] | clone(boolean[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |
byte[] | clone(byte[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |
byte[] | clone(byte[] data) clone if (data == null) { return null; byte[] copy = new byte[data.length]; System.arraycopy(data, 0, copy, 0, data.length); return copy; |
char[] | clone(char[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |
double[] | clone(double[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |
float[] | clone(float[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |
int[] | clone(int[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |
int[] | clone(int[] data) clone if (data == null) { return null; int[] copy = new int[data.length]; System.arraycopy(data, 0, copy, 0, data.length); return copy; |
long[] | clone(long[] array) Clones an array returning a typecast result and handling This method returns if (array == null) { return null; return array.clone(); |