net.finmath.marketdata.model.curves
Interface CurveBuilderInterface
-
- All Known Implementing Classes:
- Curve.CurveBuilder, PiecewiseCurve.CurveBuilder, SeasonalCurve.CurveBuilder
public interface CurveBuilderInterfaceInterface 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description CurveBuilderInterfaceaddPoint(double time, double value, boolean isParameter)Add a point to the curve.CurveInterfacebuild()Build the curve.
-
-
-
Method Detail
-
build
CurveInterface build() throws java.lang.CloneNotSupportedException
Build the curve. The method returns the curve object. The builder cannot be used to build another curve. Use clone instead.- Returns:
- The curve according to the specification.
- Throws:
java.lang.CloneNotSupportedException- Thrown if the curve could not be build (likely due to a template throwingCloneNotSupportedException.
-
addPoint
CurveBuilderInterface addPoint(double time, double value, boolean isParameter)
Add a point to the curve.- Parameters:
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, seeCurve.getCloneForParameter(double[])- Returns:
- A self reference to this curve build object.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG