YieldAndDiscountAddZeroSpreadCurve extends YieldAndDiscountCurve { @Override public int getNumberOfParameters() { int result = 0; for (final YieldAndDiscountCurve curve : _curves) { result += curve.getNumberOfParameters(); } return result; } YieldAndDiscountAddZeroSpreadCurve(final String name, final boolean subtract, final YieldAndDiscountCurve... curves); @Override double getInterestRate(final Double t); @Override double getForwardRate(final double t); @Override double[] getInterestRateParameterSensitivity(final double time); @Override int getNumberOfParameters(); @Override int getNumberOfIntrinsicParameters(final Set<String> curvesNames); @Override List<String> getUnderlyingCurvesNames(); YieldAndDiscountCurve[] getCurves(); double getSign(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void numberOfParameters() { assertEquals("YieldAndDiscountAddZeroSpreadCurve: number of parameters", YIELD.getNumberOfParameters() + DISCOUNT.getNumberOfParameters(), ZERO_ADD_SPREAD.getNumberOfParameters(), TOLERANCE_RATE); }