class IborInterpolatedRateComputation implements RateComputation, ImmutableBean, Serializable {

  public static IborInterpolatedRateComputation of(
      IborIndex index1,
      IborIndex index2,
      LocalDate fixingDate,
      ReferenceData refData) {

    boolean inOrder = indicesInOrder(index1, index2, fixingDate);
    IborIndexObservation obs1 = IborIndexObservation.of(index1, fixingDate, refData);
    IborIndexObservation obs2 = IborIndexObservation.of(index2, fixingDate, refData);
    return new IborInterpolatedRateComputation(inOrder ? obs1 : obs2, inOrder ? obs2 : obs1);
  }

  private  IborInterpolatedRateComputation(
      IborIndexObservation shortObservation,
      IborIndexObservation longObservation);

}