R - the type of the currency converted resultpublic interface ScenarioFxConvertible<R>
The interface is intended to operate with multi-scenario objects. As such, the supplied market data is scenario aware, and the FX rate used to convert each value may be different.
For example, the object implementing this interface might hold 100 instances of
CurrencyAmount, one for each scenario. When invoked, the ScenarioFxRateProvider
will be used to convert each of the 100 amounts, with each conversion potentially
having a different FX rate.
This is the multi-scenario version of FxConvertible.
| Modifier and Type | Method and Description |
|---|---|
R |
convertedTo(Currency resultCurrency,
ScenarioFxRateProvider rateProvider)
Converts this instance to an equivalent amount in the specified currency.
|
R convertedTo(Currency resultCurrency, ScenarioFxRateProvider rateProvider)
The result, which may be of a different type, will be expressed in terms of the given currency. Any FX conversion that is required will use rates from the provider.
Any object that is not a currency amount will be left unchanged. The number of scenarios of this instance must match the number of scenarios of the specified provider.
resultCurrency - the currency of the resultrateProvider - the multi-scenario 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.