/src/main/java/net/finmath/modelling/productfactory/InterestRateMonteCarloProductFactory.java
final InterestRateSwapProductDescriptor swap    = ( InterestRateSwapProductDescriptor) descriptor;final InterestRateSwapLegProductDescriptor swapLeg   = ( InterestRateSwapLegProductDescriptor) descriptor;
final InterestRateSwapLegProductDescriptor swapLeg   = ( InterestRateSwapLegProductDescriptor ) descriptor;
super(); this.referenceDate = referenceDate; } @Override public DescribedProduct<? extends InterestRateProductDescriptor> getProductFromDescriptor(final ProductDescriptor descriptor) { if(descriptor instanceof InterestRateSwapLegProductDescriptor) { <extra_id_0> final DescribedProduct<InterestRateSwapLegProductDescriptor> product = new SwapLegMonteCarlo(swapLeg, referenceDate); return product; } else if(descriptor instanceof InterestRateSwapProductDescriptor){ final InterestRateSwapProductDescriptor swap = (InterestRateSwapProductDescriptor) descriptor; final DescribedProduct<InterestRateSwapProductDescriptor> product = new SwapMonteCarlo(swap, referenceDate);