code: public static DiscountCurveInterface createDiscountFactorsFromForwardRates(String name, TimeDiscretizationInterface tenor, double[] forwardRates) {
  		DiscountCurve discountFactors = new DiscountCurve(name);
  
  		double df = 1.0;
  		for(int timeIndex=0; timeIndex<tenor.getNumberOfTimeSteps();timeIndex++) {
  			df /= 1.0 + forwardRates[timeIndex] * tenor.getTimeStep(timeIndex);
  			discountFactors.addDiscountFactor(tenor.getTime(timeIndex+1), df, tenor.getTime(timeIndex+1) > 0);
  		}
  
  		return discountFactors;
  	}
docs: Create a discount curve from given time discretization and forward rates.
  This function is provided for "single interest rate curve" frameworks.
  
  @param name The name of this discount curve.
  @param tenor Time discretization for the forward rates
  @param forwardRates Array of forward rates.
  @return A new discount factor object.