public interface PointSensitivity extends FxConvertible<PointSensitivity>
The sensitivity to a single point on a curve, surface or similar.
This is used within PointSensitivities.
Each implementation of this interface will consist of two distinct parts. The first is a set of information that identifies the point. The second is the sensitivity value.
For example, when an Ibor index is queried, the implementation would typically contain the Ibor index, fixing date and the sensitivity value.
Implementations must be immutable and thread-safe beans.
| Modifier and Type | Method and Description |
|---|---|
int |
compareKey(PointSensitivity other)
Compares the key of two sensitivities, excluding the point sensitivity value.
|
default PointSensitivity |
convertedTo(Currency resultCurrency,
FxRateProvider rateProvider)
Converts this instance to an equivalent amount in the specified currency.
|
Currency |
getCurrency()
Gets the currency of the point sensitivity.
|
double |
getSensitivity()
Gets the point sensitivity value.
|
PointSensitivity |
withCurrency(Currency currency)
Returns an instance with the specified sensitivity currency set.
|
PointSensitivity |
withSensitivity(double sensitivity)
Returns an instance with the new point sensitivity value.
|
Currency getCurrency()
double getSensitivity()
PointSensitivity withCurrency(Currency currency)
The result will consists of the same points, but with the sensitivity currency altered.
currency - the new currencyPointSensitivity withSensitivity(double sensitivity)
sensitivity - the new sensitivityint compareKey(PointSensitivity other)
If the other point sensitivity is of a different type, the comparison is based solely on the simple class name. If the point sensitivity is of the same type, the comparison must check the key, then the currency, then the date, then any other state.
The comparison by simple class name ensures that all instances of the same type are ordered together.
other - the other sensitivitydefault PointSensitivity convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
The result will be expressed in terms of the given currency. Any FX conversion that is required will use rates from the provider.
convertedTo in interface FxConvertible<PointSensitivity>resultCurrency - the currency of the resultrateProvider - the provider of FX ratesRuntimeException - if no FX rate could be foundCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.