private InflationEndInterpolatedRateComputation(double startIndexValue, PriceIndexObservation endObservation, PriceIndexObservation endSecondObservation, double weight)
 {
     ArgChecker.notNegativeOrZero(startIndexValue, "startIndexValue");
     JodaBeanUtils.notNull(endObservation, "endObservation");
     JodaBeanUtils.notNull(endSecondObservation, "endSecondObservation");
     ArgChecker.notNegative(weight, "weight");
     this.startIndexValue      = startIndexValue;
     this.endObservation       = endObservation;
     this.endSecondObservation = endSecondObservation;
     this.weight = weight;
     validate();
 }
 private InflationMonthlyRateComputation(PriceIndexObservation startObservation, PriceIndexObservation endObservation)
 {
     JodaBeanUtils.notNull(startObservation, "startObservation");
     JodaBeanUtils.notNull(endObservation, "endObservation");
     this.startObservation = startObservation;
     this.endObservation   = endObservation;
     validate();
 }
 //-------------------------------------------------------------------------
 /// <summary>
 /// Creates an instance from an index, start index value and reference end month.
 /// <para>
 /// The second end observations will be one month later than the end month.
 ///
 /// </para>
 /// </summary>
 /// <param name="index">  the index </param>
 /// <param name="startIndexValue">  the start index value </param>
 /// <param name="referenceEndMonth">  the reference end month </param>
 /// <param name="weight">  the weight </param>
 /// <returns> the inflation rate computation </returns>
 public static InflationEndInterpolatedRateComputation of(PriceIndex index, double startIndexValue, YearMonth referenceEndMonth, double weight)
 {
     return(new InflationEndInterpolatedRateComputation(startIndexValue, PriceIndexObservation.of(index, referenceEndMonth), PriceIndexObservation.of(index, referenceEndMonth.plusMonths(1)), weight));
 }