Interface PathFunction

All Known Implementing Classes:
AbstractAggregation, Average, Length, Max, Min, PassthruPathFunction, StandardDeviation, Sum

public interface PathFunction
Defines the pattern by which a function can be executed over the result set in the particular path being grabbed. The Function's input is the content of the data from the json path selector and its output is defined via the functions behavior. Thus transformations in types can take place. Additionally, functions can accept multiple selectors in order to produce their output. Created by matt@mjgreenwood.net on 6/26/15.
  • Method Summary

    Modifier and Type
    Method
    Description
    invoke(String currentPath, PathRef parent, Object model, EvaluationContext ctx)
    Invoke the function and output a JSON object (or scalar) value which will be the result of executing the path
  • Method Details

    • invoke

      Object invoke(String currentPath, PathRef parent, Object model, EvaluationContext ctx)
      Invoke the function and output a JSON object (or scalar) value which will be the result of executing the path
      Parameters:
      currentPath - The current path location inclusive of the function name
      parent - The path location above the current function
      model - The JSON model as input to this particular function
      ctx - Eval context, state bag used as the path is traversed, maintains the result of executing
      Returns: