Modifier and Type | Class and Description |
---|---|
static class |
InfixOpNode.InfixOperator |
EMPTY_CHILDREN
Constructor and Description |
---|
InfixOpNode(org.antlr.v4.runtime.ParserRuleContext ctx,
BaseNode left,
String op,
BaseNode right) |
Modifier and Type | Method and Description |
---|---|
static Object |
add(Object left,
Object right,
EvaluationContext ctx) |
static Object |
and(Object left,
Object right,
EvaluationContext ctx)
Implements the ternary logic AND operation
|
static Object |
div(Object left,
Object right,
EvaluationContext ctx) |
Object |
evaluate(EvaluationContext ctx) |
ASTNode[] |
getChildrenNode() |
BaseNode |
getLeft() |
InfixOpNode.InfixOperator |
getOperator() |
Type |
getResultType() |
BaseNode |
getRight() |
boolean |
isBoolean() |
static Object |
math(Object left,
Object right,
EvaluationContext ctx,
BinaryOperator<BigDecimal> op) |
static Object |
mult(Object left,
Object right,
EvaluationContext ctx) |
static Object |
or(Object left,
Object right,
EvaluationContext ctx)
Implements the ternary logic OR operation
|
void |
setLeft(BaseNode left) |
void |
setOperator(InfixOpNode.InfixOperator operator) |
void |
setRight(BaseNode right) |
static Object |
sub(Object left,
Object right,
EvaluationContext ctx) |
astEvent, astEvent, getEndChar, getEndColumn, getEndLine, getStartChar, getStartColumn, getStartLine, getText, setEndChar, setEndColumn, setEndLine, setStartChar, setStartColumn, setStartLine, setText, toString
public InfixOpNode.InfixOperator getOperator()
public void setOperator(InfixOpNode.InfixOperator operator)
public boolean isBoolean()
public BaseNode getLeft()
public void setLeft(BaseNode left)
public BaseNode getRight()
public void setRight(BaseNode right)
public Type getResultType()
getResultType
in interface ASTNode
getResultType
in class BaseNode
public Object evaluate(EvaluationContext ctx)
public static Object add(Object left, Object right, EvaluationContext ctx)
public static Object sub(Object left, Object right, EvaluationContext ctx)
public static Object mult(Object left, Object right, EvaluationContext ctx)
public static Object div(Object left, Object right, EvaluationContext ctx)
public static Object math(Object left, Object right, EvaluationContext ctx, BinaryOperator<BigDecimal> op)
public static Object and(Object left, Object right, EvaluationContext ctx)
public static Object or(Object left, Object right, EvaluationContext ctx)
public ASTNode[] getChildrenNode()
getChildrenNode
in interface ASTNode
getChildrenNode
in class BaseNode
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.