Package com.opengamma.strata.measure.fx
Class FxRateMarketDataFunction
- java.lang.Object
-
- com.opengamma.strata.measure.fx.FxRateMarketDataFunction
-
- All Implemented Interfaces:
MarketDataFunction<FxRate,FxRateId>
public class FxRateMarketDataFunction extends Object implements MarketDataFunction<FxRate,FxRateId>
Function which buildsFxRateinstances from observable market data.FxRateConfigdefines which market data is used to build the FX rates.
-
-
Constructor Summary
Constructors Constructor Description FxRateMarketDataFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarketDataBox<FxRate>build(FxRateId id, MarketDataConfig marketDataConfig, ScenarioMarketData marketData, ReferenceData refData)Builds and returns the market data identified by the ID.Class<FxRateId>getMarketDataIdType()Returns the type of market data ID this function can handle.MarketDataRequirementsrequirements(FxRateId id, MarketDataConfig marketDataConfig)Returns requirements representing the data needed to build the item of market data identified by the ID.
-
-
-
Method Detail
-
requirements
public MarketDataRequirements requirements(FxRateId id, MarketDataConfig marketDataConfig)
Description copied from interface:MarketDataFunctionReturns requirements representing the data needed to build the item of market data identified by the ID.- Specified by:
requirementsin interfaceMarketDataFunction<FxRate,FxRateId>- Parameters:
id- an ID identifying an item of market datamarketDataConfig- configuration specifying how market data values should be built- Returns:
- requirements representing the data needed to build the item of market data identified by the ID
-
build
public MarketDataBox<FxRate> build(FxRateId id, MarketDataConfig marketDataConfig, ScenarioMarketData marketData, ReferenceData refData)
Description copied from interface:MarketDataFunctionBuilds and returns the market data identified by the ID.If the data cannot be built the result contains details of the problem.
- Specified by:
buildin interfaceMarketDataFunction<FxRate,FxRateId>- Parameters:
id- ID of the market data that should be builtmarketDataConfig- configuration specifying how the market data should be builtmarketData- a set of market data including any data required to build the requested datarefData- the reference data- Returns:
- built market data, or details of the problems that prevented building
-
getMarketDataIdType
public Class<FxRateId> getMarketDataIdType()
Description copied from interface:MarketDataFunctionReturns the type of market data ID this function can handle.- Specified by:
getMarketDataIdTypein interfaceMarketDataFunction<FxRate,FxRateId>- Returns:
- the type of market data ID this function can handle
-
-