Class CurveSensitivitiesBuilder
- java.lang.Object
-
- com.opengamma.strata.market.sensitivity.CurveSensitivitiesBuilder
-
public final class CurveSensitivitiesBuilder extends Object
Builder forCurveSensitivities
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurveSensitivitiesBuilder
add(CurveSensitivities other)
Adds another set of sensitivities to the builder.CurveSensitivitiesBuilder
add(CurveSensitivitiesType type, CurveName curveName, Currency currency, ParameterMetadata metadata, double sensitivityValue)
Adds a single sensitivity to the builder.CurveSensitivitiesBuilder
add(CurveSensitivitiesType type, CurrencyParameterSensitivities sensitivities)
Adds sensitivities to the builder.CurveSensitivitiesBuilder
add(CurveSensitivitiesType type, CurrencyParameterSensitivity sensitivity)
Adds a sensitivity to the builder.CurveSensitivities
build()
Builds the sensitivity from the provided data.
-
-
-
Method Detail
-
add
public CurveSensitivitiesBuilder add(CurveSensitivities other)
Adds another set of sensitivities to the builder.Values with the same market data name and currency will be merged.
- Parameters:
other
- the other sensitivities- Returns:
- this, for chaining
-
add
public CurveSensitivitiesBuilder add(CurveSensitivitiesType type, CurrencyParameterSensitivities sensitivities)
Adds sensitivities to the builder.Values with the same market data name and currency will be merged.
- Parameters:
type
- the sensitivity typesensitivities
- the sensitivities to add- Returns:
- this, for chaining
-
add
public CurveSensitivitiesBuilder add(CurveSensitivitiesType type, CurrencyParameterSensitivity sensitivity)
Adds a sensitivity to the builder.Values with the same market data name and currency will be merged.
- Parameters:
type
- the sensitivity typesensitivity
- the sensitivity to add- Returns:
- this, for chaining
-
add
public CurveSensitivitiesBuilder add(CurveSensitivitiesType type, CurveName curveName, Currency currency, ParameterMetadata metadata, double sensitivityValue)
Adds a single sensitivity to the builder.Values with the same market data name and currency will be merged.
- Parameters:
type
- the sensitivity typecurveName
- the curve namecurrency
- the currency of the sensitivitymetadata
- the sensitivity metadata, not emptysensitivityValue
- the sensitivity value- Returns:
- this, for chaining
-
build
public CurveSensitivities build()
Builds the sensitivity from the provided data.If all the values for a single sensitivity are tenor-based, or all are date-based, then the resulting sensitivity will have the tenors sorted.
- Returns:
- the sensitivities instance
-
-