public final class CurrencyParameterSensitivitiesBuilder extends Object
CurrencyParameterSensitivities.public CurrencyParameterSensitivitiesBuilder add(CurrencyParameterSensitivities sensitivities)
Values with the same market data name and currency will be merged.
sensitivities - the sensitivities to addpublic CurrencyParameterSensitivitiesBuilder add(List<CurrencyParameterSensitivity> sensitivities)
Values with the same market data name and currency will be merged.
sensitivities - the sensitivities to addpublic CurrencyParameterSensitivitiesBuilder add(CurrencyParameterSensitivity sensToAdd)
Values with the same market data name and currency will be merged.
sensToAdd - the sensitivity to addpublic CurrencyParameterSensitivitiesBuilder add(MarketDataName<?> marketDataName, Currency currency, ParameterMetadata metadata, double sensitivityValue)
Values with the same market data name and currency will be merged.
marketDataName - the curve namecurrency - the currency of the sensitivitymetadata - the sensitivity metadata, not emptysensitivityValue - the sensitivity valuepublic CurrencyParameterSensitivitiesBuilder mapMetadata(UnaryOperator<ParameterMetadata> metadataFn)
If the function returns the same metadata for two different inputs, the sensitivity value will be summed. For example, this could be used to normalize tenors.
metadataFn - the function to adjust the metadatapublic CurrencyParameterSensitivitiesBuilder mapSensitivities(BiFunction<ParameterMetadata,Double,Double> mapFn)
mapFn - the function to adjust the sensitivitypublic CurrencyParameterSensitivitiesBuilder filterSensitivity(DoublePredicate predicate)
For example, this could be used to remove sensitivities near to zero.
If the filter removes all the values for a market data name, the name will not be present in the result.
predicate - the predicate to test the value, return true to retain the valuepublic CurrencyParameterSensitivities build()
If all the values added are tenor-based, or all are date-based, then the resulting sensitivity will have the tenors sorted.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.