public void setXVal(Double[] newXVal) {
        if (newXVal == null) {
            this.xVal = new Double[0];
        } else {
            this.xVal = Arrays.copyOf(newXVal, newXVal.length);
        }
    }