SpreadDoublesCurve extends DoublesCurve { public String getLongName() { final StringBuilder buf = new StringBuilder(getName()); buf.append("="); int i = 0; buf.append("("); for (final Curve<Double, Double> curve : _curves) { if (curve instanceof SpreadDoublesCurve) { buf.append(((SpreadDoublesCurve) curve).getLongName().substring(2)); } else { buf.append(curve.getName()); } if (i != _curves.length - 1) { buf.append(_spreadFunction.getOperationName()); } i++; } buf.append(")"); return buf.toString(); } 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 public void testGetLongName() { assertEquals(SPREAD1.getLongName(), NAME1 + "=(a+b)"); assertEquals(SPREAD2.getLongName(), NAME2 + "=((a+b)-a)"); assertEquals(SPREAD3.getLongName(), NAME3 + "=(a+a+a)"); }