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 booleanequals(Object obj)FieldNamegetFieldName()Gets the field name in the market data record that contains the market data item.IndexgetIndex()Gets the index.ObservableSourcegetObservableSource()Gets the source of observable market data.StandardIdgetStandardId()Gets the identifier of the data.inthashCode()static org.joda.beans.TypedMetaBean<IndexQuoteId>meta()The meta-bean forIndexQuoteId.org.joda.beans.TypedMetaBean<IndexQuoteId>metaBean()static IndexQuoteIdof(Index index)Obtains an instance used to obtain an observable value of the index.static IndexQuoteIdof(Index index, FieldName fieldName)Obtains an instance used to obtain an observable value of the index.static IndexQuoteIdof(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.StringtoString()IndexQuoteIdwithObservableSource(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_VALUEand 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:
getStandardIdin interfaceObservableId- Returns:
- the standard identifier
-
withObservableSource
public IndexQuoteId withObservableSource(ObservableSource obsSource)
Description copied from interface:ObservableIdReturns an identifier equivalent to this with the specified source.- Specified by:
withObservableSourcein 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:
metaBeanin 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:
getFieldNamein interfaceObservableId- Returns:
- the value of the property, not null
-
getObservableSource
public ObservableSource getObservableSource()
Gets the source of observable market data.- Specified by:
getObservableSourcein interfaceObservableId- Returns:
- the value of the property, not null
-
-