public final class ImmutableScenarioMarketDataBuilder extends Object
This is used to create implementations of ImmutableScenarioMarketData.
| Modifier and Type | Method and Description |
|---|---|
<T> ImmutableScenarioMarketDataBuilder |
addBox(MarketDataId<T> id,
MarketDataBox<? extends T> value)
Adds market data wrapped in a box.
|
ImmutableScenarioMarketDataBuilder |
addBoxMap(Map<? extends MarketDataId<?>,? extends MarketDataBox<?>> values)
Adds market data values for each scenario.
|
<T> ImmutableScenarioMarketDataBuilder |
addScenarioValue(MarketDataId<T> id,
List<? extends T> values)
Adds market data for each scenario.
|
<T> ImmutableScenarioMarketDataBuilder |
addScenarioValue(MarketDataId<T> id,
ScenarioArray<? extends T> value)
Adds market data for each scenario.
|
ImmutableScenarioMarketDataBuilder |
addScenarioValueMap(Map<? extends MarketDataId<?>,? extends ScenarioArray<?>> values)
Adds market data values for each scenario.
|
ImmutableScenarioMarketDataBuilder |
addTimeSeries(ObservableId id,
LocalDateDoubleTimeSeries timeSeries)
Adds a time-series of observable market data values.
|
ImmutableScenarioMarketDataBuilder |
addTimeSeriesMap(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeriesMap)
Adds multiple time-series of observable market data values to the builder.
|
<T> ImmutableScenarioMarketDataBuilder |
addValue(MarketDataId<T> id,
T value)
Adds market data that is valid for all scenarios.
|
ImmutableScenarioMarketDataBuilder |
addValueMap(Map<? extends MarketDataId<?>,?> values)
Adds market data values that are valid for all scenarios.
|
ImmutableScenarioMarketData |
build()
Builds the market data.
|
ImmutableScenarioMarketDataBuilder |
timeSeries(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeries)
Sets the time-series in the builder, replacing any existing values.
|
ImmutableScenarioMarketDataBuilder |
values(Map<? extends MarketDataId<?>,?> values)
Sets the values in the builder, replacing any existing values.
|
public ImmutableScenarioMarketDataBuilder values(Map<? extends MarketDataId<?>,?> values)
values - the valuespublic ImmutableScenarioMarketDataBuilder timeSeries(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeries)
timeSeries - the time-seriespublic <T> ImmutableScenarioMarketDataBuilder addValue(MarketDataId<T> id, T value)
Any existing value with the same identifier will be replaced.
T - the type of the market data valueid - the identifiervalue - the market data valuepublic ImmutableScenarioMarketDataBuilder addValueMap(Map<? extends MarketDataId<?>,?> values)
Each value in the map is a single item of market data used in all scenarios. Any existing value with the same identifier will be replaced.
values - the items of market data, keyed by identifierpublic <T> ImmutableScenarioMarketDataBuilder addScenarioValue(MarketDataId<T> id, List<? extends T> values)
Any existing value with the same identifier will be replaced.
T - the type of the market data valuesid - the identifiervalues - the market data values, one for each scenariopublic <T> ImmutableScenarioMarketDataBuilder addScenarioValue(MarketDataId<T> id, ScenarioArray<? extends T> value)
Any existing value with the same identifier will be replaced.
T - the type of the market data valuesid - the identifiervalue - the market data values, one for each scenariopublic ImmutableScenarioMarketDataBuilder addScenarioValueMap(Map<? extends MarketDataId<?>,? extends ScenarioArray<?>> values)
Each value in the map contains multiple market data items, one for each scenario. Any existing value with the same identifier will be replaced.
values - the items of market data, keyed by identifierpublic <T> ImmutableScenarioMarketDataBuilder addBox(MarketDataId<T> id, MarketDataBox<? extends T> value)
Any existing value with the same identifier will be replaced.
T - the type of the market data valueid - the identifiervalue - the market data valuepublic ImmutableScenarioMarketDataBuilder addBoxMap(Map<? extends MarketDataId<?>,? extends MarketDataBox<?>> values)
Each value in the map is a market data box. Any existing value with the same identifier will be replaced.
values - the items of market data, keyed by identifierpublic ImmutableScenarioMarketDataBuilder addTimeSeries(ObservableId id, LocalDateDoubleTimeSeries timeSeries)
Any existing time-series with the same identifier will be replaced.
id - the identifiertimeSeries - a time-series of observable market data valuespublic ImmutableScenarioMarketDataBuilder addTimeSeriesMap(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeriesMap)
Any existing time-series with the same identifier will be replaced.
timeSeriesMap - the map of time-seriespublic ImmutableScenarioMarketData build()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.