final Coupon cp = Coupon.class.isAssignableFrom(flow.getClass()) ? (Coupon)flow : null;
if (cp != null) {
if (firstCouponFound) {
QL.require(nominal == cp.nominal() &&
accrualPeriod == cp.accrualPeriod() &&
dc.equals(cp.dayCounter()),
"cannot aggregate accrued amount of two " +
"different coupons on " + paymentDate.toString());
} else {
firstCouponFound = true;
nominal = cp.nominal();