Package org.kie.dmn.feel.lang.ast
Class InfixOpNode
- java.lang.Object
-
- org.kie.dmn.feel.lang.ast.BaseNode
-
- org.kie.dmn.feel.lang.ast.InfixOpNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInfixOpNode.InfixOperator
-
Field Summary
-
Fields inherited from class org.kie.dmn.feel.lang.ast.BaseNode
EMPTY_CHILDREN
-
-
Constructor Summary
Constructors Constructor Description InfixOpNode(org.antlr.v4.runtime.ParserRuleContext ctx, BaseNode left, String op, BaseNode right)
-
Method Summary
-
Methods inherited from class org.kie.dmn.feel.lang.ast.BaseNode
astEvent, astEvent, copyLocationAttributesFrom, getEndChar, getEndColumn, getEndLine, getStartChar, getStartColumn, getStartLine, getText, setEndChar, setEndColumn, setEndLine, setStartChar, setStartColumn, setStartLine, setText, toString
-
-
-
-
Method Detail
-
getOperator
public InfixOpNode.InfixOperator getOperator()
-
setOperator
public void setOperator(InfixOpNode.InfixOperator operator)
-
isBoolean
public boolean isBoolean()
-
getLeft
public BaseNode getLeft()
-
setLeft
public void setLeft(BaseNode left)
-
getRight
public BaseNode getRight()
-
setRight
public void setRight(BaseNode right)
-
getResultType
public Type getResultType()
- Specified by:
getResultTypein interfaceASTNode- Overrides:
getResultTypein classBaseNode
-
evaluate
public Object evaluate(EvaluationContext ctx)
-
add
public static Object add(Object left, Object right, EvaluationContext ctx)
-
sub
public static Object sub(Object left, Object right, EvaluationContext ctx)
-
mult
public static Object mult(Object left, Object right, EvaluationContext ctx)
-
div
public static Object div(Object left, Object right, EvaluationContext ctx)
-
math
public static Object math(Object left, Object right, EvaluationContext ctx, BinaryOperator<BigDecimal> op)
-
and
@Deprecated public static Object and(Object left, Object right, EvaluationContext ctx)
Deprecated.this variant do not allow short-circuit of the operatorImplements the ternary logic AND operation
-
or
@Deprecated public static Object or(Object left, Object right, EvaluationContext ctx)
Deprecated.this variant do not allow short-circuit of the operatorImplements the ternary logic OR operation
-
getChildrenNode
public ASTNode[] getChildrenNode()
- Specified by:
getChildrenNodein interfaceASTNode- Overrides:
getChildrenNodein classBaseNode
-
-