Class DefaultCurveMetadataBuilder
- java.lang.Object
-
- com.opengamma.strata.market.curve.DefaultCurveMetadataBuilder
-
public final class DefaultCurveMetadataBuilder extends Object
Builder for curve metadata.This is created using
DefaultCurveMetadata.builder().
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> DefaultCurveMetadataBuilderaddInfo(CurveInfoType<T> type, T value)Adds a single piece of additional information.DefaultCurveMetadatabuild()Builds the metadata instance.DefaultCurveMetadataBuilderclearParameterMetadata()Clears the parameter-level metadata.DefaultCurveMetadataBuildercurveName(CurveName curveName)Sets the curve name.DefaultCurveMetadataBuildercurveName(String curveName)Sets the curve name.DefaultCurveMetadataBuilderdayCount(DayCount dayCount)Sets the day count.DefaultCurveMetadataBuilderjacobian(JacobianCalibrationMatrix jacobian)Sets the calibration information.DefaultCurveMetadataBuilderparameterMetadata(ParameterMetadata... parameterMetadata)Sets the parameter-level metadata.DefaultCurveMetadataBuilderparameterMetadata(List<? extends ParameterMetadata> parameterMetadata)Sets the parameter-level metadata.DefaultCurveMetadataBuilderxValueType(ValueType xValueType)Sets the x-value type, providing meaning to the x-values of the curve.DefaultCurveMetadataBuilderyValueType(ValueType yValueType)Sets the y-value type, providing meaning to the y-values of the curve.
-
-
-
Method Detail
-
curveName
public DefaultCurveMetadataBuilder curveName(String curveName)
Sets the curve name.- Parameters:
curveName- the curve name- Returns:
- this, for chaining
-
curveName
public DefaultCurveMetadataBuilder curveName(CurveName curveName)
Sets the curve name.- Parameters:
curveName- the curve name- Returns:
- this, for chaining
-
xValueType
public DefaultCurveMetadataBuilder xValueType(ValueType xValueType)
Sets the x-value type, providing meaning to the x-values of the curve.This type provides meaning to the x-values. For example, the x-value might represent a year fraction, as represented using
ValueType.YEAR_FRACTION.If using the builder, this defaults to
ValueType.UNKNOWN.- Parameters:
xValueType- the x-value type- Returns:
- this, for chaining
-
yValueType
public DefaultCurveMetadataBuilder yValueType(ValueType yValueType)
Sets the y-value type, providing meaning to the y-values of the curve.This type provides meaning to the y-values. For example, the y-value might represent a zero rate, as represented using
ValueType.ZERO_RATE.If using the builder, this defaults to
ValueType.UNKNOWN.- Parameters:
yValueType- the y-value type- Returns:
- this, for chaining
-
dayCount
public DefaultCurveMetadataBuilder dayCount(DayCount dayCount)
Sets the day count.This stores the day count in the additional information map using the key
CurveInfoType.DAY_COUNT.This is stored in the additional information map using
Map.putsemantics, removing the key if the day count is null.- Parameters:
dayCount- the day count, may be null- Returns:
- this, for chaining
-
jacobian
public DefaultCurveMetadataBuilder jacobian(JacobianCalibrationMatrix jacobian)
Sets the calibration information.This stores the calibration information in the additional information map using the key
CurveInfoType.JACOBIAN.This is stored in the additional information map using
Map.putsemantics, removing the key if the jacobian is null.- Parameters:
jacobian- the calibration information, may be null- Returns:
- this, for chaining
-
addInfo
public <T> DefaultCurveMetadataBuilder addInfo(CurveInfoType<T> type, T value)
Adds a single piece of additional information.This is stored in the additional information map using
Map.putsemantics, removing the key if the instance is null.- Type Parameters:
T- the type of the info- Parameters:
type- the type to store undervalue- the value to store, may be null- Returns:
- this, for chaining
-
parameterMetadata
public DefaultCurveMetadataBuilder parameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
Sets the parameter-level metadata.The parameter metadata must match the number of parameters on the curve. This will replace the existing parameter-level metadata.
- Parameters:
parameterMetadata- the parameter metadata- Returns:
- this, for chaining
-
parameterMetadata
public DefaultCurveMetadataBuilder parameterMetadata(ParameterMetadata... parameterMetadata)
Sets the parameter-level metadata.The parameter metadata must match the number of parameters on the curve. This will replace the existing parameter-level metadata.
- Parameters:
parameterMetadata- the parameter metadata- Returns:
- this, for chaining
-
clearParameterMetadata
public DefaultCurveMetadataBuilder clearParameterMetadata()
Clears the parameter-level metadata.The existing parameter-level metadata will be removed.
- Returns:
- this, for chaining
-
build
public DefaultCurveMetadata build()
Builds the metadata instance.- Returns:
- the instance
-
-