R- the type of the currency converted result
public 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
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
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 result
rateProvider- the multi-scenario provider of FX rates
RuntimeException- if no FX rate could be found
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.