code: public static RandomVariable getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurveInterface discountCurve, AnalyticModel model) {
  		RandomVariable value = new RandomVariableFromDoubleArray(0.0);
  		for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) {
  			double paymentDate		= schedule.getPayment(periodIndex);
  			if(paymentDate <= evaluationTime) {
  				continue;
  			}
  
  			double periodLength		= schedule.getPeriodLength(periodIndex);
  			RandomVariable discountFactor	= discountCurve.getDiscountFactor(model, paymentDate);
  			value = discountFactor.mult(periodLength).add(value);
  		}
  		return value.div(discountCurve.getDiscountFactor(model, evaluationTime));
  	}
docs: Function to calculate an (idealized) swap annuity for a given schedule and discount curve.
  
  Note that, the value returned is divided by the discount factor at evaluation.
  This matters, if the discount factor at evaluationTime is not equal to 1.0.
  
  @param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.
  @param schedule The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period.
  @param discountCurve The discount curve.
  @param model The model, needed only in case the discount curve evaluation depends on an additional curve.
  @return The swap annuity.