T
 the type of the target handled by this function, often a tradeR
 the type of value calculated by this functionpublic interface DerivedCalculationFunction<T extends CalculationTarget,R>
Strata executes the other function and checks that all required measures are available before calling this function.
A derived calculation function can be added to an existing set of calculation functions using
CalculationFunctions.composedWith(DerivedCalculationFunction[])
.
Modifier and Type  Method and Description 

R 
calculate(T target,
Map<Measure,Object> requiredMeasures,
CalculationParameters parameters,
ScenarioMarketData marketData,
ReferenceData refData)
Calculates the measure.

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.

Class<T> targetType()
Measure measure()
Set<Measure> requiredMeasures()
FunctionRequirements requirements(T target, CalculationParameters parameters, ReferenceData refData)
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 calculationsR calculate(T target, Map<Measure,Object> requiredMeasures, CalculationParameters parameters, ScenarioMarketData marketData, ReferenceData refData)
This method is only invoked if all of the required measures are available.
Therefore implementation can safely assume that requiredMeasures
contains all the
required data.
target
 the target of the calculation, often a traderequiredMeasures
 the calculated measure values required by this function to calculate its measureparameters
 the calculation parameters specifying how the calculations should be performedmarketData
 the market data used in the calculationsrefData
 the reference data used in the calculationsCopyright 2009Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.