class InflationInterpolatedRateComputation implements RateComputation, ImmutableBean, Serializable {

  public static InflationInterpolatedRateComputation of(
      PriceIndex index,
      YearMonth referenceStartMonth,
      YearMonth referenceEndMonth,
      double weight) {

    return new InflationInterpolatedRateComputation(
        PriceIndexObservation.of(index, referenceStartMonth),
        PriceIndexObservation.of(index, referenceStartMonth.plusMonths(1)),
        PriceIndexObservation.of(index, referenceEndMonth),
        PriceIndexObservation.of(index, referenceEndMonth.plusMonths(1)),
        weight);
  }

  private  InflationInterpolatedRateComputation(
      PriceIndexObservation startObservation,
      PriceIndexObservation startSecondObservation,
      PriceIndexObservation endObservation,
      PriceIndexObservation endSecondObservation,
      double weight);

}