Interpolator1DCubicSplineDataBundle implements Interpolator1DDataBundle, Serializable { @Override public void setYValueAtIndex(final int index, final double y) { ArgumentChecker.notNegative(index, "index"); if (index >= size()) { throw new IllegalArgumentException("Index was greater than number of data points"); } _underlyingData.setYValueAtIndex(index, y); _secondDerivatives = null; _secondDerivativesSensitivities = null; } Interpolator1DCubicSplineDataBundle(final Interpolator1DDataBundle underlyingData);  Interpolator1DCubicSplineDataBundle(final Interpolator1DDataBundle underlyingData, final double leftGrad, final double rightGrad); @Override boolean containsKey(final Double key); @Override Double firstKey(); @Override Double firstValue(); @Override Double get(final Double key); @Override InterpolationBoundedValues getBoundedValues(final Double key); @Override double[] getKeys(); @Override int getLowerBoundIndex(final Double value); @Override Double getLowerBoundKey(final Double value); @Override double[] getValues(); @Override Double higherKey(final Double key); @Override Double higherValue(final Double key); @Override Double lastKey(); @Override Double lastValue(); @Override int size(); double[] getSecondDerivatives(); double[][] getSecondDerivativesSensitivities(); @Override void setYValueAtIndex(final int index, final double y); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testSetNegativeIndex() { DATA.setYValueAtIndex(-2, 3); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testSetHighIndex() { DATA.setYValueAtIndex(100, 4); }