Class ValuePathEvaluator
- java.lang.Object
-
- com.opengamma.strata.report.framework.expression.ValuePathEvaluator
-
public final class ValuePathEvaluator extends Object
Evaluates a path describing a value to be shown in a trade report.For example, if the expression is '
The result of evaluating the expression is the index name.Product.index.name
' and the results containFraTrade
instances the following calls will be made for each trade in the results:
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Result<?>>
evaluate(String valuePath, ReportCalculationResults results)
Evaluates a value path against a set of results, returning the resolved result for each trade.static Optional<Measure>
measure(String valuePath)
Gets the measure encoded in a value path, if present.static Set<String>
tokens(Object object)
Gets the supported tokens on the given object.
-
-
-
Method Detail
-
measure
public static Optional<Measure> measure(String valuePath)
Gets the measure encoded in a value path, if present.- Parameters:
valuePath
- the value path- Returns:
- the measure, if present
-
evaluate
public static List<Result<?>> evaluate(String valuePath, ReportCalculationResults results)
Evaluates a value path against a set of results, returning the resolved result for each trade.- Parameters:
valuePath
- the value pathresults
- the calculation results- Returns:
- the list of resolved results for each trade
-
-