public class ImmutableMarketDataBuilder extends Object
ImmutableMarketData
.Modifier and Type | Method and Description |
---|---|
ImmutableMarketDataBuilder |
add(MarketData other)
Adds all time series and values from another market data instance.
|
ImmutableMarketDataBuilder |
addTimeSeries(ObservableId id,
LocalDateDoubleTimeSeries timeSeries)
Adds a time-series of observable market data values.
|
ImmutableMarketDataBuilder |
addTimeSeriesMap(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeriesMap)
Adds multiple time-series of observable market data values to the builder.
|
<T> ImmutableMarketDataBuilder |
addValue(MarketDataId<T> id,
T value)
Adds a value to the builder.
|
ImmutableMarketDataBuilder |
addValueMap(Map<? extends MarketDataId<?>,?> values)
Adds multiple values to the builder.
|
<T> ImmutableMarketDataBuilder |
addValueUnsafe(MarketDataId<?> id,
Object value)
Adds a value to the builder when the types are not known at compile time.
|
ImmutableMarketData |
build()
Returns a set of market data built from the data in this builder.
|
ImmutableMarketDataBuilder |
removeTimeSeriesIf(Predicate<ObservableId> predicate)
Removes values where the time series ID matches the specified predicate.
|
ImmutableMarketDataBuilder |
removeValueIf(Predicate<MarketDataId<?>> predicate)
Removes values where the value ID matches the specified predicate.
|
ImmutableMarketDataBuilder |
timeSeries(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeries)
Sets the time-series in the builder, replacing any existing values.
|
ImmutableMarketDataBuilder |
valuationDate(LocalDate valuationDate)
Sets the valuation date.
|
ImmutableMarketDataBuilder |
values(Map<? extends MarketDataId<?>,?> values)
Sets the values in the builder, replacing any existing values.
|
public ImmutableMarketDataBuilder valuationDate(LocalDate valuationDate)
valuationDate
- the valuation date to setpublic ImmutableMarketDataBuilder values(Map<? extends MarketDataId<?>,?> values)
values
- the valuespublic ImmutableMarketDataBuilder timeSeries(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeries)
timeSeries
- the time-seriespublic <T> ImmutableMarketDataBuilder addValue(MarketDataId<T> id, T value)
T
- the type of the market data valueid
- the identifiervalue
- the market data valuepublic <T> ImmutableMarketDataBuilder addValueUnsafe(MarketDataId<?> id, Object value)
T
- the type of the market data valueid
- the identifiervalue
- the market data valuepublic ImmutableMarketDataBuilder addValueMap(Map<? extends MarketDataId<?>,?> values)
values
- the valuespublic ImmutableMarketDataBuilder 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 ImmutableMarketDataBuilder addTimeSeriesMap(Map<? extends ObservableId,LocalDateDoubleTimeSeries> timeSeriesMap)
Any existing time-series with the same identifier will be replaced.
timeSeriesMap
- the map of time-seriespublic ImmutableMarketDataBuilder add(MarketData other)
The valuation date of the other market data instance is ignored.
other
- the other market data instancepublic ImmutableMarketDataBuilder removeTimeSeriesIf(Predicate<ObservableId> predicate)
predicate
- the predicate to apply, item removed if the predicate returns truepublic ImmutableMarketDataBuilder removeValueIf(Predicate<MarketDataId<?>> predicate)
predicate
- the predicate to apply, item removed if the predicate returns truepublic ImmutableMarketData build()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.