class Main{
/**
* Returns a clone of the specified array.
*
* @param source the source array (null
not permitted).
*
* @return A clone of the array.
*
* @since JFreeChart 1.0.13
*/
public static double[][] clone(double[][] source) {
if (source == null) {
throw new IllegalArgumentException("Null 'source' argument.");
}
double[][] clone = new double[source.length][];
for (int i = 0; i < source.length; i++) {
if (source[i] != null) {
double[] row = new double[source[i].length];
System.arraycopy(source[i], 0, row, 0, source[i].length);
clone[i] = row;
}
}
return clone;
}
}