/src/main/java/net/finmath/modelling/productfactory/InterestRateMonteCarloProductFactory.java
} legPayer     = ( TermStructureMonteCarloProduct) factory.getProductFromDescriptor( legDescriptor) ;legDescriptor     = descriptor.getLegPayer( ) ;
legDescriptor     = descriptor.getLegPayer ( ) ; legPayer     = ( TermStructureMonteCarloProduct ) factory.getProductFromDescriptor ( legDescriptor ) ; }
private final TermStructureMonteCarloProduct legReceiver; private final TermStructureMonteCarloProduct legPayer; public SwapMonteCarlo(final InterestRateSwapProductDescriptor descriptor, final LocalDate referenceDate) { final InterestRateMonteCarloProductFactory factory = new InterestRateMonteCarloProductFactory(referenceDate); InterestRateProductDescriptor legDescriptor = descriptor.getLegReceiver(); legReceiver = (TermStructureMonteCarloProduct) factory.getProductFromDescriptor(legDescriptor); <extra_id_0> @Override public RandomVariable getValue(final double evaluationTime, final TermStructureMonteCarloSimulationModel model) throws CalculationException { RandomVariable value = new RandomVariableFromDoubleArray(0); if(legPayer != null) { value = value.add(legReceiver.getValue(evaluationTime, model)); }