final AnnuityCouponIborSpreadDefinition payLegDefinition = getIborSwapLegDefinition(effectiveDate, maturityDate, (FloatingSpreadIRLeg) floatPayLeg, calendar, currency, true);
if (floatReceiveLeg instanceof FloatingSpreadIRLeg) {
final AnnuityCouponIborSpreadDefinition receiveLegDefinition = getIborSwapLegDefinition(effectiveDate, maturityDate, (FloatingSpreadIRLeg) floatReceiveLeg, calendar, currency, false);
return SwapIborIborDefinition.from(payLegDefinition, receiveLegDefinition);
}
final AnnuityCouponIborDefinition receiveLegDefinition = getIborSwapLegDefinition(effectiveDate, maturityDate, floatReceiveLeg, calendar, currency, false);
return SwapIborIborDefinition.from(payLegDefinition, receiveLegDefinition);
}
final AnnuityCouponIborDefinition payLegDefinition = getIborSwapLegDefinition(effectiveDate, maturityDate, floatPayLeg, calendar, currency, true);
if (floatReceiveLeg instanceof FloatingSpreadIRLeg) {
final AnnuityCouponIborSpreadDefinition receiveLegDefinition = getIborSwapLegDefinition(effectiveDate, maturityDate, (FloatingSpreadIRLeg) floatReceiveLeg, calendar, currency, false);
return SwapIborIborDefinition.from(payLegDefinition, receiveLegDefinition);
}
final AnnuityCouponIborDefinition receiveLegDefinition = getIborSwapLegDefinition(effectiveDate, maturityDate, floatReceiveLeg, calendar, currency, false);
return SwapIborIborDefinition.from(payLegDefinition, receiveLegDefinition);
}