Class QuoteScenarioArrayId
- java.lang.Object
-
- com.opengamma.strata.market.observable.QuoteScenarioArrayId
-
- All Implemented Interfaces:
ScenarioMarketDataId<Double,QuoteScenarioArray>
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class QuoteScenarioArrayId extends Object implements ScenarioMarketDataId<Double,QuoteScenarioArray>, org.joda.beans.ImmutableBean, Serializable
An identifier identifying aQuoteScenarioArray
containing values for a piece of quoted market data in multiple scenarios.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QuoteScenarioArrayId.Meta
The meta-bean forQuoteScenarioArrayId
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QuoteScenarioArray
createScenarioValue(MarketDataBox<Double> marketDataBox, int scenarioCount)
Creates an instance of the scenario market data object from a box containing data of the same underlying type.boolean
equals(Object obj)
QuoteId
getId()
Gets the market data key identifying the quote.QuoteId
getMarketDataId()
Gets the market data identifier of the market data value.Class<QuoteScenarioArray>
getScenarioMarketDataType()
Gets the type of the object containing the market data for all scenarios.int
hashCode()
static QuoteScenarioArrayId.Meta
meta()
The meta-bean forQuoteScenarioArrayId
.QuoteScenarioArrayId.Meta
metaBean()
static QuoteScenarioArrayId
of(StandardId id, FieldName fieldName)
Returns a key identifying the market data with the specified ID and field name.static QuoteScenarioArrayId
of(QuoteId quoteId)
Returns a key identifying the same market data as the quote key.String
toString()
-
-
-
Method Detail
-
of
public static QuoteScenarioArrayId of(StandardId id, FieldName fieldName)
Returns a key identifying the market data with the specified ID and field name.- Parameters:
id
- the ID of the quotefieldName
- the field name of the market data record containing the quote data- Returns:
- a key identifying the market data with the specified ID and field name
-
of
public static QuoteScenarioArrayId of(QuoteId quoteId)
Returns a key identifying the same market data as the quote key.- Parameters:
quoteId
- key identifying the quote- Returns:
- a key identifying the same market data as the quote key
-
getMarketDataId
public QuoteId getMarketDataId()
Description copied from interface:ScenarioMarketDataId
Gets the market data identifier of the market data value.- Specified by:
getMarketDataId
in interfaceScenarioMarketDataId<Double,QuoteScenarioArray>
- Returns:
- the market data identifier of the market data value
-
getScenarioMarketDataType
public Class<QuoteScenarioArray> getScenarioMarketDataType()
Description copied from interface:ScenarioMarketDataId
Gets the type of the object containing the market data for all scenarios.- Specified by:
getScenarioMarketDataType
in interfaceScenarioMarketDataId<Double,QuoteScenarioArray>
- Returns:
- the type of the object containing the market data for all scenarios
-
createScenarioValue
public QuoteScenarioArray createScenarioValue(MarketDataBox<Double> marketDataBox, int scenarioCount)
Description copied from interface:ScenarioMarketDataId
Creates an instance of the scenario market data object from a box containing data of the same underlying type.There are many possible ways to store scenario market data for a data type. For example, if the single values are doubles, the scenario value might simply be a
List<Double>
or it might be a wrapper class that stores the values more efficiently in adouble[]
.This method allows a scenario value of the required type to be created from a different type of scenario value or from a single value.
Normally this method will not be used. It is assumed the required scenario values will be created by the perturbations that create scenario data. However there is no mechanism in the market data system to guarantee that scenario values of a particular type are available. If they are not, this method creates them on demand.
Values returned from this method might be cached in the market data containers for efficiency.
- Specified by:
createScenarioValue
in interfaceScenarioMarketDataId<Double,QuoteScenarioArray>
- Parameters:
marketDataBox
- a market data box containing single market data values of the same type as the scenario value identified by this keyscenarioCount
- the number of scenarios for which data is required in the returned value- Returns:
- an object containing market data for multiple scenarios built from the data in the market data box
-
meta
public static QuoteScenarioArrayId.Meta meta()
The meta-bean forQuoteScenarioArrayId
.- Returns:
- the meta-bean, not null
-
metaBean
public QuoteScenarioArrayId.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getId
public QuoteId getId()
Gets the market data key identifying the quote.- Returns:
- the value of the property, not null
-
-