Class PositionTokenEvaluator
- java.lang.Object
-
- com.opengamma.strata.report.framework.expression.TokenEvaluator<Position>
-
- com.opengamma.strata.report.framework.expression.PositionTokenEvaluator
-
public class PositionTokenEvaluator extends TokenEvaluator<Position>
Evaluates a token against a trade to produce another object.This merges the
Position
andPositionInfo
objects, giving priority toPosition
.
-
-
Constructor Summary
Constructors Constructor Description PositionTokenEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationResult
evaluate(Position position, CalculationFunctions functions, String firstToken, List<String> remainingTokens)
Evaluates a token against a given object.Class<Position>
getTargetType()
Gets the type against which tokens can be evaluated in this implementation.Set<String>
tokens(Position position)
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<Position> getTargetType()
Description copied from class:TokenEvaluator
Gets the type against which tokens can be evaluated in this implementation.- Specified by:
getTargetType
in classTokenEvaluator<Position>
- Returns:
- the evaluation type
-
tokens
public Set<String> tokens(Position position)
Description copied from class:TokenEvaluator
Gets the set of supported token for the given object.- Specified by:
tokens
in classTokenEvaluator<Position>
- Parameters:
position
- the object against which tokens may be evaluated- Returns:
- the set of supported tokens
-
evaluate
public EvaluationResult evaluate(Position position, CalculationFunctions functions, String firstToken, List<String> remainingTokens)
Description copied from class:TokenEvaluator
Evaluates a token against a given object.- Specified by:
evaluate
in classTokenEvaluator<Position>
- Parameters:
position
- 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
-
-