Package jmri.jmrit.logixng.util.parser
Class ExpressionNodeBinaryOperator
- java.lang.Object
-
- jmri.jmrit.logixng.util.parser.ExpressionNodeBinaryOperator
-
- All Implemented Interfaces:
ExpressionNode
public class ExpressionNodeBinaryOperator extends java.lang.Object implements ExpressionNode
A parsed expression
-
-
Constructor Summary
Constructors Constructor Description ExpressionNodeBinaryOperator(TokenType tokenType, ExpressionNode leftSide, ExpressionNode rightSide)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
calculate(SymbolTable symbolTable)
Calculate the expressionjava.lang.String
getDefinitionString()
Get a String that defines this expression node.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrit.logixng.util.parser.ExpressionNode
assignValue, canBeAssigned
-
-
-
-
Constructor Detail
-
ExpressionNodeBinaryOperator
public ExpressionNodeBinaryOperator(TokenType tokenType, ExpressionNode leftSide, ExpressionNode rightSide)
-
-
Method Detail
-
calculate
public java.lang.Object calculate(SymbolTable symbolTable) throws JmriException
Description copied from interface:ExpressionNode
Calculate the expression- Specified by:
calculate
in interfaceExpressionNode
- Parameters:
symbolTable
- the symbol table- Returns:
- the result
- Throws:
JmriException
- if an error occurs
-
getDefinitionString
public java.lang.String getDefinitionString()
Get a String that defines this expression node.- Specified by:
getDefinitionString
in interfaceExpressionNode
- Returns:
- the string
-
-