class CapFloorCMSSpread extends CouponFloating implements CapFloor {

  @SuppressWarnings("deprecation")
  @Override
  public CapFloorCMSSpread withNotional(final double notional) {
    try {
      return new CapFloorCMSSpread(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _underlyingSwap1, _cmsIndex1, _underlyingSwap2, _cmsIndex2, _settlementTime,
          _strike, _isCap, getFundingCurveName());
    } catch (final IllegalStateException e) {
      return new CapFloorCMSSpread(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _underlyingSwap1, _cmsIndex1, _underlyingSwap2, _cmsIndex2, _settlementTime,
          _strike, _isCap);
    }
  }

  @Deprecated public  CapFloorCMSSpread(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional, final double fixingTime,
      final SwapFixedCoupon<? extends Payment> underlyingSwap1, final IndexSwap cmsIndex1, final SwapFixedCoupon<? extends Payment> underlyingSwap2, final IndexSwap cmsIndex2,
      final double settlementTime, final double strike, final boolean isCap, final String fundingCurveName);
  public  CapFloorCMSSpread(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional, final double fixingTime,
      final SwapFixedCoupon<? extends Payment> underlyingSwap1, final IndexSwap cmsIndex1, final SwapFixedCoupon<? extends Payment> underlyingSwap2, final IndexSwap cmsIndex2,
      final double settlementTime, final double strike, final boolean isCap);

}