CouponIborSpread extends CouponFloating implements DepositIndexCoupon<IborIndex> { @SuppressWarnings("deprecation") @Override public CouponIborSpread withNotional(final double notional) { try { return new CouponIborSpread(getCurrency(), getPaymentTime(), getFundingCurveName(), getPaymentYearFraction(), notional, getFixingTime(), _index, getFixingPeriodStartTime(), getFixingPeriodEndTime(), getFixingAccrualFactor(), getSpread(), getForwardCurveName()); } catch (final IllegalStateException e) { return new CouponIborSpread(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _index, getFixingPeriodStartTime(), getFixingPeriodEndTime(), getFixingAccrualFactor(), getSpread()); } } @Deprecated  CouponIborSpread(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 double spread, final String forwardCurveName); @Deprecated  CouponIborSpread(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);  CouponIborSpread(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 spread);  CouponIborSpread(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); double getFixingPeriodStartTime(); double getFixingPeriodEndTime(); double getFixingAccrualFactor(); double getSpread(); double getSpreadAmount(); @Deprecated String getForwardCurveName(); @Override IborIndex getIndex(); CouponIborSpread withZeroSpread(); @SuppressWarnings("deprecation") @Override CouponIborSpread withNotional(final double notional); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); @SuppressWarnings("deprecation") CouponIborSpread withSpread(final double spread); @Override T accept(final InstrumentDerivativeVisitor<S, T> visitor, final S data); @Override T accept(final InstrumentDerivativeVisitor<?, T> visitor);  }
@Test public void testWithNotional() { final double notional = NOTIONAL + 100; final CouponIborSpread expected = new CouponIborSpread(CUR, PAYMENT_TIME, PAYMENT_YEAR_FRACTION, notional, FIXING_PERIOD_START_TIME, INDEX, FIXING_PERIOD_END_TIME, MATURITY, FORWARD_YEAR_FRACTION); assertEquals(expected, PAYMENT1.withNotional(notional)); }