class SpreadDoublesCurve extends DoublesCurve {

  public Set<String> getUnderlyingNames() {
    final Set<String> result = new HashSet<>();
    for (final Curve<Double, Double> curve : _curves) {
      if (curve instanceof SpreadDoublesCurve) {
        result.addAll(((SpreadDoublesCurve) curve).getUnderlyingNames());
      } else {
        result.add(curve.getName());
      }
    }
    return result;
  }

  protected  SpreadDoublesCurve();
  public  SpreadDoublesCurve(final CurveSpreadFunction spreadFunction, final DoublesCurve... curves);
  public  SpreadDoublesCurve(final CurveSpreadFunction spreadFunction, final String name, final DoublesCurve... curves);

}