/**
 * Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.analytics.financial.interestrate;

import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixed;
import com.opengamma.util.money.CurrencyAmount;

/**
 *
 */
public class CouponPaymentVisitor extends InstrumentDerivativeVisitorAdapter<Void, CurrencyAmount> {

  @Override
  public CurrencyAmount visitCouponFixed(final CouponFixed payment) {
    return CurrencyAmount.of(payment.getCurrency(), payment.getNotional() * payment.getPaymentYearFraction() * payment.getFixedRate());
  }

}

@@ -275,16 +275,114 @@
 nFixed;%0A
+import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixedCompounding;%0A
 import c
@@ -758,10 +758,226 @@
 );%0A  %7D%0A%0A
+  @Override%0A  public CurrencyAmount visitCouponFixedCompounding(final CouponFixedCompounding payment) %7B%0A    return CurrencyAmount.of(payment.getCurrency(), payment.getNotionalAccrued() - payment.getNotional());%0A  %7D%0A%0A
 %7D%0A

handle CouponFixedCompounding in CouponPaymentVisitor