/src/main/java/net/finmath/montecarlo/interestrate/products/SwapWithComponents.java
legs.add ( fixedLeg ) ;
for(int periodIndex=0; periodIndex<fixingDates.length; periodIndex++) { final AbstractIndex index = new FixedCoupon(swaprates[periodIndex]); final Period period = new Period(fixingDates[periodIndex], paymentDates[periodIndex], fixingDates[periodIndex], paymentDates[periodIndex], notional, index, true, false, true); fixedLegPeriods.add(period); } final ProductCollection fixedLeg = new ProductCollection(fixedLegPeriods); <extra_id_0> final Collection<AbstractProductComponent> floatingLegPeriods = new ArrayList<>(); for(int periodIndex=0; periodIndex<fixingDates.length; periodIndex++) { final double periodLength = paymentDates[periodIndex]-fixingDates[periodIndex]; final AbstractIndex index = new LIBORIndex(0.0,periodLength); final Period period = new Period(fixingDates[periodIndex], paymentDates[periodIndex], fixingDates[periodIndex], paymentDates[periodIndex], notional, index, true, false, false); floatingLegPeriods.add(period);