class InterpolatedNodalCurve implements NodalCurve, ImmutableBean, Serializable {

  public static InterpolatedNodalCurve of(
      CurveMetadata metadata,
      DoubleArray xValues,
      DoubleArray yValues,
      CurveInterpolator interpolator) {

    return InterpolatedNodalCurve.builder()
        .metadata(metadata)
        .xValues(xValues)
        .yValues(yValues)
        .interpolator(interpolator)
        .build();
  }

  @ImmutableConstructor private  InterpolatedNodalCurve(
      CurveMetadata metadata,
      DoubleArray xValues,
      DoubleArray yValues,
      CurveInterpolator interpolator,
      CurveExtrapolator extrapolatorLeft,
      CurveExtrapolator extrapolatorRight);

}