public final class FxRateId extends Object implements MarketDataId<FxRate>, org.joda.beans.ImmutableBean, Serializable
The currency pair in a rate ID is always the market convention currency pair. If an ID is
created using a non-conventional pair, the pair is inverted. This has no effect on the
FxRate
identified by the ID as it can handle both currency pairs that can be
created from the two currencies.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Class<FxRate> |
getMarketDataType()
Gets the type of data this identifier refers to.
|
ObservableSource |
getObservableSource()
Gets the source of observable market data.
|
CurrencyPair |
getPair()
Gets the currency pair that is required.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<FxRateId> |
meta()
The meta-bean for
FxRateId . |
org.joda.beans.TypedMetaBean<FxRateId> |
metaBean() |
static FxRateId |
of(Currency base,
Currency counter)
Obtains an instance representing the FX rate for a currency pair.
|
static FxRateId |
of(Currency base,
Currency counter,
ObservableSource observableSource)
Obtains an instance representing the FX rate for a currency pair, specifying the source.
|
static FxRateId |
of(CurrencyPair currencyPair)
Obtains an instance representing the FX rate for a currency pair.
|
static FxRateId |
of(CurrencyPair currencyPair,
ObservableSource observableSource)
Obtains an instance representing the FX rate for a currency pair, specifying the source.
|
String |
toString() |
public static FxRateId of(CurrencyPair currencyPair)
currencyPair
- a currency pairpublic static FxRateId of(Currency base, Currency counter)
base
- the base currency of the paircounter
- the counter currency of the pairpublic static FxRateId of(CurrencyPair currencyPair, ObservableSource observableSource)
currencyPair
- a currency pairobservableSource
- the source of the observable market data used to create the ratepublic static FxRateId of(Currency base, Currency counter, ObservableSource observableSource)
base
- the base currency of the paircounter
- the counter currency of the pairobservableSource
- the source of the observable market data used to create the ratepublic Class<FxRate> getMarketDataType()
MarketDataId
getMarketDataType
in interface MarketDataId<FxRate>
public static org.joda.beans.TypedMetaBean<FxRateId> meta()
FxRateId
.public org.joda.beans.TypedMetaBean<FxRateId> metaBean()
metaBean
in interface org.joda.beans.Bean
public CurrencyPair getPair()
public ObservableSource getObservableSource()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.