T - the type of calculation target handled by the functionR - the type of the measure calculated by the functionpublic abstract class AbstractDerivedCalculationFunction<T extends CalculationTarget,R> extends Object implements DerivedCalculationFunction<T,R>
Empty requirements are returned from requirements(T, com.opengamma.strata.calc.runner.CalculationParameters, com.opengamma.strata.basics.ReferenceData).
Subtypes only need to provide an implementation of the DerivedCalculationFunction.calculate(T, java.util.Map<com.opengamma.strata.calc.Measure, java.lang.Object>, com.opengamma.strata.calc.runner.CalculationParameters, com.opengamma.strata.data.scenario.ScenarioMarketData, com.opengamma.strata.basics.ReferenceData) method.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDerivedCalculationFunction(Class<T> targetType,
Measure measure,
Measure... requiredMeasures)
Creates a new function which calculates one measure for targets of one type.
|
protected |
AbstractDerivedCalculationFunction(Class<T> targetType,
Measure measure,
Set<Measure> requiredMeasures)
Creates a new function which calculates one measure for targets of one type.
|
| Modifier and Type | Method and Description |
|---|---|
Measure |
measure()
Returns the measure calculated by the function.
|
Set<Measure> |
requiredMeasures()
Returns the measures required by this function to calculate its measure.
|
FunctionRequirements |
requirements(T target,
CalculationParameters parameters,
ReferenceData refData)
Returns requirements for the market data required by this function to calculate its measure.
|
Class<T> |
targetType()
Returns the type of calculation target handled by the function.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateprotected AbstractDerivedCalculationFunction(Class<T> targetType, Measure measure, Measure... requiredMeasures)
targetType - the target type handled by the function, often a trademeasure - the measure calculated by the functionrequiredMeasures - the measures required as inputs to the calculationprotected AbstractDerivedCalculationFunction(Class<T> targetType, Measure measure, Set<Measure> requiredMeasures)
targetType - the target type handled by the function, often a trademeasure - the measure calculated by the functionrequiredMeasures - the measures required as inputs to the calculationpublic Class<T> targetType()
DerivedCalculationFunctiontargetType in interface DerivedCalculationFunction<T extends CalculationTarget,R>public Measure measure()
DerivedCalculationFunctionmeasure in interface DerivedCalculationFunction<T extends CalculationTarget,R>public Set<Measure> requiredMeasures()
DerivedCalculationFunctionrequiredMeasures in interface DerivedCalculationFunction<T extends CalculationTarget,R>public FunctionRequirements requirements(T target, CalculationParameters parameters, ReferenceData refData)
DerivedCalculationFunctionrequirements in interface DerivedCalculationFunction<T extends CalculationTarget,R>target - the target of the calculation, often a tradeparameters - the calculation parameters specifying how the calculations should be performedrefData - the reference data used in the calculationsCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.