Class 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 '' and the results contain FraTrade instances the following calls will be made for each trade in the results:

    • FraTrade.getProduct() returning a Fra
    • Fra.getIndex() returning an IborIndex
    • IborIndex.getName() returning the index name
    The result of evaluating the expression is the index name.
    • Method Detail

      • measure

        public static Optional<Measure> measure​(String valuePath)
        Gets the measure encoded in a value path, if present.
        valuePath - the value path
        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.
        valuePath - the value path
        results - the calculation results
        the list of resolved results for each trade
      • tokens

        public static Set<String> tokens​(Object object)
        Gets the supported tokens on the given object.
        object - the object for which to return the valid tokens
        the tokens