T - the type of the market data handled by the mappingpublic final class PerturbationMapping<T> extends Object implements org.joda.beans.ImmutableBean
The mapping links the perturbation to be applied to the filter that decides whether it applies. The generic types of the filter can be for a subtype of the type that the perturbation applies to.
| Modifier and Type | Class and Description |
|---|---|
static class |
PerturbationMapping.Builder<T>
The bean-builder for
PerturbationMapping. |
static class |
PerturbationMapping.Meta<T>
The meta-bean for
PerturbationMapping. |
| Modifier and Type | Method and Description |
|---|---|
MarketDataBox<T> |
applyPerturbation(MarketDataBox<T> marketData,
ReferenceData refData)
Applies the perturbations in this mapping to an item of market data and returns the results.
|
static <T> PerturbationMapping.Builder<T> |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
MarketDataFilter<? extends T,?> |
getFilter()
Gets the filter that decides whether the perturbation should be applied to a piece of market data.
|
Class<T> |
getMarketDataType()
Gets the type of market data handled by this mapping.
|
ScenarioPerturbation<T> |
getPerturbation()
Gets perturbation that should be applied to market data as part of a scenario.
|
int |
getScenarioCount()
Returns the number of scenarios for which this mapping can generate data.
|
int |
hashCode() |
boolean |
matches(MarketDataId<?> marketDataId,
MarketDataBox<?> marketData,
ReferenceData refData)
Returns true if the filter matches the market data ID and value.
|
static PerturbationMapping.Meta |
meta()
The meta-bean for
PerturbationMapping. |
PerturbationMapping.Meta<T> |
metaBean() |
static <R> PerturbationMapping.Meta<R> |
metaPerturbationMapping(Class<R> cls)
The meta-bean for
PerturbationMapping. |
static <T> PerturbationMapping<T> |
of(MarketDataFilter<? extends T,?> filter,
ScenarioPerturbation<T> perturbation)
Returns a mapping containing a single perturbation.
|
PerturbationMapping.Builder<T> |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static <T> PerturbationMapping<T> of(MarketDataFilter<? extends T,?> filter, ScenarioPerturbation<T> perturbation)
This uses the type from ScenarioPerturbation as the type of the mapping.
T - the type of the market data handled by the mappingfilter - the filter used to choose the market dataperturbation - the perturbation applied to any market data matching the filterpublic boolean matches(MarketDataId<?> marketDataId, MarketDataBox<?> marketData, ReferenceData refData)
marketDataId - the ID of a piece of market datamarketData - the market data valuerefData - the reference datapublic MarketDataBox<T> applyPerturbation(MarketDataBox<T> marketData, ReferenceData refData)
This method should only be called after calling #matches and receiving a result of true.
marketData - the market data valuerefData - the reference datapublic int getScenarioCount()
public static PerturbationMapping.Meta meta()
PerturbationMapping.public static <R> PerturbationMapping.Meta<R> metaPerturbationMapping(Class<R> cls)
PerturbationMapping.R - the bean's generic typecls - the bean's generic typepublic static <T> PerturbationMapping.Builder<T> builder()
T - the typepublic PerturbationMapping.Meta<T> metaBean()
metaBean in interface org.joda.beans.Beanpublic Class<T> getMarketDataType()
public MarketDataFilter<? extends T,?> getFilter()
public ScenarioPerturbation<T> getPerturbation()
public PerturbationMapping.Builder<T> toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.