SpreadDoublesCurve extends DoublesCurve { @Override public Double getYValue(final Double x) { ArgumentChecker.notNull(x, "x"); return _f.evaluate(x); } protected  SpreadDoublesCurve();  SpreadDoublesCurve(final CurveSpreadFunction spreadFunction, final DoublesCurve... curves);  SpreadDoublesCurve(final CurveSpreadFunction spreadFunction, final String name, final DoublesCurve... curves); static SpreadDoublesCurve from(final CurveSpreadFunction spreadFunction, final DoublesCurve... curves); static SpreadDoublesCurve from(final CurveSpreadFunction spreadFunction, final String name, final DoublesCurve... curves); Set<String> getUnderlyingNames(); String getLongName(); DoublesCurve[] getUnderlyingCurves(); @Override Double[] getXData(); @Override Double[] getYData(); @Override Double getYValue(final Double x); @Override Double[] getYValueParameterSensitivity(final Double x); @Override double getDyDx(final double x); @Override int size(); @Override boolean equals(final Object obj); @Override int hashCode(); static SpreadDoublesCurve.Meta meta(); @Override SpreadDoublesCurve.Meta metaBean(); final Property<CurveSpreadFunction> spreadFunction(); final Property<Function<Double, Double>> f(); final Property<DoublesCurve[]> curves(); @Override SpreadDoublesCurve clone(); @Override String toString();  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullXValue() { SPREAD1.getYValue(null); }
@Test public void testGetYValue() { final double x = 1.5; final double eps = 1e-12; assertEquals(SPREAD1.getYValue(x), INTERPOLATED1.getYValue(x) + INTERPOLATED2.getYValue(x), eps); assertEquals(SPREAD2.getYValue(x), INTERPOLATED2.getYValue(x), eps); assertEquals(SPREAD3.getYValue(x), 3 * INTERPOLATED1.getYValue(x), eps); }