I get a "Type mismatch: cannot convert from Object to Number" error when using this code below:
Code:
public class ConvolutionMatrixSetting {
private Number [][] coefficients;
private Number scale;
private Number offset;
private int height;
private int width;
private String name;
public ConvolutionMatrixSetting(String name, Number[][] coefficients,
Number scale, Number offset){
this.name = name;
height = coefficients.length;
width = coefficients[0].length;
coefficients = new Number[height][width];
System.arraycopy(coefficients, 0, this.coefficients, 0, height);
this.scale = scale.clone(); // DOES NOT WORK
this.offset = offset.clone(); // DOES NOT WORK
}