code: public static HazardCurve createHazardCurveFromSurvivalProbabilities(
  			String name,
  			double[] times,
  			double[] givenSurvivalProbabilities,
  			InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) {
  
  		boolean[] isParameter = new boolean[times.length];
  
  		for(int timeIndex=0; timeIndex<times.length;timeIndex++) {
  			isParameter[timeIndex] = times[timeIndex] > 0;
  		}
  
  		return createHazardCurveFromSurvivalProbabilities(name, times, givenSurvivalProbabilities, isParameter, interpolationMethod, extrapolationMethod, interpolationEntity);
  	}
docs: Create a hazard curve from given times and given survival probabilities using given interpolation and extrapolation methods.
  
  @param name The name of this hazard curve.
  @param times Array of times as doubles.
  @param givenSurvivalProbabilities Array of corresponding survival probabilities.
  @param interpolationMethod The interpolation method used for the curve.
  @param extrapolationMethod The extrapolation method used for the curve.
  @param interpolationEntity The entity interpolated/extrapolated.
  @return A new discount factor object.