class CapFloorIbor extends CouponFloating implements CapFloor {

  @SuppressWarnings("deprecation")
  @Override
  public Coupon withNotional(final double notional) {
    try {
      return new CapFloorIbor(getCurrency(), getPaymentTime(), getFundingCurveName(), getPaymentYearFraction(), notional, getFixingTime(), _index, _fixingPeriodStartTime, _fixingPeriodEndTime,
          _fixingAccrualFactor, _forwardCurveName, _strike, _isCap);
    } catch (final IllegalStateException e) {
      return new CapFloorIbor(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _index, _fixingPeriodStartTime, _fixingPeriodEndTime,
          _fixingAccrualFactor, _strike, _isCap);
    }
  }

  @Deprecated public  CapFloorIbor(final Currency currency, final double paymentTime, final String fundingCurveName, final double paymentYearFraction, final double notional,
      final double fixingTime, final IborIndex index, final double fixingPeriodStartTime, final double fixingPeriodEndTime, final double fixingYearFraction,
      final String forwardCurveName, final double strike, final boolean isCap);
  public  CapFloorIbor(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional, final double fixingTime, final IborIndex index,
      final double fixingPeriodStartTime, final double fixingPeriodEndTime, final double fixingYearFraction, final double strike, final boolean isCap);

}