ArgumentChecker.notNull(settlementDate, "Settlement date");
ArgumentChecker.notNull(generator, "generator");
ArgumentChecker.notNull(tenor, "tenor");
final AnnuityCouponFixedDefinition fixedLeg = AnnuityCouponFixedDefinition.from(generator.getIndexPrice().getCurrency(), settlementDate, tenor, generator.getFixedLegPeriod(),
generator.getCalendar(), generator.getFixedLegDayCount(), generator.getBusinessDayConvention(), generator.isEndOfMonth(), notional, fixedRate, isPayer);
final AnnuityCouponInflationYearOnYearInterpolationDefinition inflationLeg = AnnuityCouponInflationYearOnYearInterpolationDefinition.from(generator.getIndexPrice(), settlementDate,
notional, tenor, generator.getFixedLegPeriod(), generator.getBusinessDayConvention(), generator.getCalendar(), generator.isEndOfMonth(), generator.getMonthLag(), generator.getMonthLag(),
generator.payNotional());
return new SwapFixedInflationYearOnYearDefinition(fixedLeg, inflationLeg);
}