/src/main/java/net/finmath/montecarlo/interestrate/products/Swap.java
if( legPayer != this) {
if ( legPayer != null ) {
legReceiver = new SimpleSwap(fixingDates, paymentDates, swaprates); legPayer = null; } @Override public RandomVariable getValue(final double evaluationTime, final TermStructureMonteCarloSimulationModel model) throws CalculationException { RandomVariable value = legReceiver.getValue(evaluationTime, model); <extra_id_0> value = value.sub(legPayer.getValue(evaluationTime, model)); } return value; } @Override public String toString() {