Interface CurveBuilder

All Known Implementing Classes:
CurveInterpolation.Builder, PiecewiseCurve.Builder, SeasonalCurve.Builder

public interface CurveBuilder
Interface of builders which allow to build curve objects by successively adding points. Points cannot be added directly to a curve since curve objects are immutable (cannot be changed at a later time, i.e., after construction). Instead, a clone with an additional point is created. To efficiently create a new curve by successively adding points use this builder.
Christian Fries
  • Method Summary

    Modifier and Type
    addPoint(double time, double value, boolean isParameter)
    Add a point to the curve.
    Build the curve.
  • Method Details

    • build

      Build the curve. The method returns the curve object. The builder cannot be used to build another curve. Use clone instead.
      The curve according to the specification.
      CloneNotSupportedException - Thrown if the curve could not be build (likely due to a template throwing CloneNotSupportedException.
    • addPoint

      CurveBuilder addPoint(double time, double value, boolean isParameter)
      Add a point to the curve.
      time - The time of the corresponding point.
      value - The value of the corresponding point.
      isParameter - A boolean, specifying weather the point should be considered a free parameter (true) or not (false). Fee parameters can be used to create a clone with modified values, see CurveInterpolation.getCloneForParameter(double[])
      A self reference to this curve build object.