Class AbstractSequenceAggregation
java.lang.Object
com.jayway.jsonpath.internal.function.sequence.AbstractSequenceAggregation
- All Implemented Interfaces:
PathFunction
Defines the pattern for taking item from collection of JSONArray by index
Created by git9527 on 6/11/22.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetIndexFromParameters(EvaluationContext ctx, List<Parameter> parameters) invoke(String currentPath, PathRef parent, Object model, EvaluationContext ctx, List<Parameter> parameters) Invoke the function and output a JSON object (or scalar) value which will be the result of executing the pathprotected abstract inttargetIndex(EvaluationContext ctx, List<Parameter> parameters)
-
Constructor Details
-
AbstractSequenceAggregation
public AbstractSequenceAggregation()
-
-
Method Details
-
targetIndex
-
invoke
public Object invoke(String currentPath, PathRef parent, Object model, EvaluationContext ctx, List<Parameter> parameters) Description copied from interface:PathFunctionInvoke the function and output a JSON object (or scalar) value which will be the result of executing the path- Specified by:
invokein interfacePathFunction- Parameters:
currentPath- The current path location inclusive of the function nameparent- The path location above the current functionmodel- The JSON model as input to this particular functionctx- Eval context, state bag used as the path is traversed, maintains the result of executing- Returns:
- result
-
getIndexFromParameters
-