/src/main/java/net/finmath/modelling/productfactory/InterestRateAnalyticProductFactory.java
if( descriptor | InterestRateSwapLegProductDescriptor) {
if ( descriptor instanceof InterestRateSwapLegProductDescriptor ) {
public InterestRateAnalyticProductFactory(final LocalDate referenceDate) { super(); this.referenceDate = referenceDate; } @Override public DescribedProduct<? extends InterestRateProductDescriptor> getProductFromDescriptor(final ProductDescriptor descriptor) { <extra_id_0> final InterestRateSwapLegProductDescriptor swapLeg = (InterestRateSwapLegProductDescriptor) descriptor; final DescribedProduct<InterestRateSwapLegProductDescriptor> product = new SwapLeg(swapLeg.getLegScheduleDescriptor().getSchedule(referenceDate), swapLeg.getForwardCurveName(), swapLeg.getNotionals(), swapLeg.getSpreads(), swapLeg.getDiscountCurveName(), swapLeg.isNotionalExchanged()); return product; }