Class BooleanFunction
- java.lang.Object
-
- com.api.jsonata4java.expressions.functions.FunctionBase
-
- com.api.jsonata4java.expressions.functions.BooleanFunction
-
public class BooleanFunction extends FunctionBase
From http://docs.jsonata.org/boolean-functions.html$boolean(arg)
Casts the argument to a Boolean using the following rules Argument type Result Boolean unchanged string: empty false string: non-empty true number: 0 false number: non-zero true null false array: empty false array: contains a member that casts to true true array: all members cast to false false object: empty false object: non-empty true function: (functions are not currently supported) false
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.api.jsonata4java.expressions.functions.FunctionBase
FunctionBase.CtxEvalResult
-
-
Field Summary
Fields Modifier and Type Field Description static StringERR_ARG2BADTYPEstatic StringERR_BAD_CONTEXT
-
Constructor Summary
Constructors Constructor Description BooleanFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxArgs()intgetMinArgs()StringgetSignature()com.fasterxml.jackson.databind.JsonNodeinvoke(ExpressionsVisitor expressionVisitor, MappingExpressionParser.Function_callContext ctx)-
Methods inherited from class com.api.jsonata4java.expressions.functions.FunctionBase
evalContext, getArgumentCount, getFunctionName
-
-
-
-
Method Detail
-
invoke
public com.fasterxml.jackson.databind.JsonNode invoke(ExpressionsVisitor expressionVisitor, MappingExpressionParser.Function_callContext ctx)
- Specified by:
invokein classFunctionBase
-
getMaxArgs
public int getMaxArgs()
- Specified by:
getMaxArgsin classFunctionBase
-
getMinArgs
public int getMinArgs()
- Specified by:
getMinArgsin classFunctionBase
-
getSignature
public String getSignature()
- Specified by:
getSignaturein classFunctionBase
-
-