Class CurrencyParameterSensitivityTokenEvaluator
- java.lang.Object
-
- com.opengamma.strata.report.framework.expression.TokenEvaluator<CurrencyParameterSensitivity>
-
- com.opengamma.strata.report.framework.expression.CurrencyParameterSensitivityTokenEvaluator
-
public class CurrencyParameterSensitivityTokenEvaluator extends TokenEvaluator<CurrencyParameterSensitivity>
Token evaluator for currency parameter sensitivity.Although there is a formatter for this type, users will traverse to a single sensitivity from a list of sensitivities. This traversal may include redundant tokens, so the purpose of this evaluator is to continue returning the same sensitivity object as long as the tokens are consistent with the fields on this object.
-
-
Constructor Summary
Constructors Constructor Description CurrencyParameterSensitivityTokenEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationResult
evaluate(CurrencyParameterSensitivity sensitivity, CalculationFunctions functions, String firstToken, List<String> remainingTokens)
Evaluates a token against a given object.Class<?>
getTargetType()
Gets the type against which tokens can be evaluated in this implementation.Set<String>
tokens(CurrencyParameterSensitivity sensitivity)
Gets the set of supported token for the given object.-
Methods inherited from class com.opengamma.strata.report.framework.expression.TokenEvaluator
ambiguousTokenFailure, invalidTokenFailure
-
-
-
-
Method Detail
-
getTargetType
public Class<?> getTargetType()
Description copied from class:TokenEvaluator
Gets the type against which tokens can be evaluated in this implementation.- Specified by:
getTargetType
in classTokenEvaluator<CurrencyParameterSensitivity>
- Returns:
- the evaluation type
-
tokens
public Set<String> tokens(CurrencyParameterSensitivity sensitivity)
Description copied from class:TokenEvaluator
Gets the set of supported token for the given object.- Specified by:
tokens
in classTokenEvaluator<CurrencyParameterSensitivity>
- Parameters:
sensitivity
- the object against which tokens may be evaluated- Returns:
- the set of supported tokens
-
evaluate
public EvaluationResult evaluate(CurrencyParameterSensitivity sensitivity, CalculationFunctions functions, String firstToken, List<String> remainingTokens)
Description copied from class:TokenEvaluator
Evaluates a token against a given object.- Specified by:
evaluate
in classTokenEvaluator<CurrencyParameterSensitivity>
- Parameters:
sensitivity
- the object against which to evaluate the tokenfunctions
- the calculation functionsfirstToken
- the first token of the expressionremainingTokens
- the remaining tokens in the expression, possibly empty- Returns:
- the result of the evaluation
-
-