public class Length extends java.lang.Object implements PathFunction
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TOKEN_NAME |
| Constructor and Description |
|---|
Length() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
invoke(java.lang.String currentPath,
PathRef parent,
java.lang.Object model,
EvaluationContext ctx,
java.util.List<Parameter> parameters)
When we calculate the length of a path, what we're asking is given the node we land on how many children does it
have.
|
public static final java.lang.String TOKEN_NAME
public java.lang.Object invoke(java.lang.String currentPath,
PathRef parent,
java.lang.Object model,
EvaluationContext ctx,
java.util.List<Parameter> parameters)
invoke in interface PathFunctioncurrentPath - 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 executingparameters -