Class IndexQuoteId
- java.lang.Object
-
- com.opengamma.strata.market.observable.IndexQuoteId
-
- All Implemented Interfaces:
MarketDataId<Double>
,ObservableId
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IndexQuoteId extends Object implements ObservableId, org.joda.beans.ImmutableBean, Serializable
An identifier used to access the current value of an index.This identifier can also be used to access the historic time-series of values.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
FieldName
getFieldName()
Gets the field name in the market data record that contains the market data item.Index
getIndex()
Gets the index.ObservableSource
getObservableSource()
Gets the source of observable market data.StandardId
getStandardId()
Gets the identifier of the data.int
hashCode()
static org.joda.beans.TypedMetaBean<IndexQuoteId>
meta()
The meta-bean forIndexQuoteId
.org.joda.beans.TypedMetaBean<IndexQuoteId>
metaBean()
static IndexQuoteId
of(Index index)
Obtains an instance used to obtain an observable value of the index.static IndexQuoteId
of(Index index, FieldName fieldName)
Obtains an instance used to obtain an observable value of the index.static IndexQuoteId
of(Index index, FieldName fieldName, ObservableSource obsSource)
Obtains an instance used to obtain an observable value of the index, specifying the source of observable market data.String
toString()
IndexQuoteId
withObservableSource(ObservableSource obsSource)
Returns an identifier equivalent to this with the specified source.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.data.ObservableId
getMarketDataType
-
-
-
-
Method Detail
-
of
public static IndexQuoteId of(Index index)
Obtains an instance used to obtain an observable value of the index.The field name containing the data is
FieldName.MARKET_VALUE
and the market data source isObservableSource.NONE
.- Parameters:
index
- the index- Returns:
- the identifier
-
of
public static IndexQuoteId of(Index index, FieldName fieldName)
Obtains an instance used to obtain an observable value of the index.The market data source is
ObservableSource.NONE
.- Parameters:
index
- the indexfieldName
- the name of the field in the market data record holding the data- Returns:
- the identifier
-
of
public static IndexQuoteId of(Index index, FieldName fieldName, ObservableSource obsSource)
Obtains an instance used to obtain an observable value of the index, specifying the source of observable market data.- Parameters:
index
- the indexfieldName
- the name of the field in the market data record holding the dataobsSource
- the source of observable market data- Returns:
- the identifier
-
getStandardId
public StandardId getStandardId()
Gets the identifier of the data.This returns an artificial identifier with a scheme of 'OG-Index' and a value of the index name.
- Specified by:
getStandardId
in interfaceObservableId
- Returns:
- the standard identifier
-
withObservableSource
public IndexQuoteId withObservableSource(ObservableSource obsSource)
Description copied from interface:ObservableId
Returns an identifier equivalent to this with the specified source.- Specified by:
withObservableSource
in interfaceObservableId
- Parameters:
obsSource
- the source of market data- Returns:
- the observable identifier
-
meta
public static org.joda.beans.TypedMetaBean<IndexQuoteId> meta()
The meta-bean forIndexQuoteId
.- Returns:
- the meta-bean, not null
-
metaBean
public org.joda.beans.TypedMetaBean<IndexQuoteId> metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getIndex
public Index getIndex()
Gets the index.- Returns:
- the value of the property, not null
-
getFieldName
public FieldName getFieldName()
Gets the field name in the market data record that contains the market data item. The most common field name is market value.- Specified by:
getFieldName
in interfaceObservableId
- Returns:
- the value of the property, not null
-
getObservableSource
public ObservableSource getObservableSource()
Gets the source of observable market data.- Specified by:
getObservableSource
in interfaceObservableId
- Returns:
- the value of the property, not null
-
-