Package jmri.jmrit.logixng.util.parser
Class ExpressionNodeComplex
- java.lang.Object
-
- jmri.jmrit.logixng.util.parser.ExpressionNodeComplex
-
- All Implemented Interfaces:
ExpressionNode
public class ExpressionNodeComplex extends java.lang.Object implements ExpressionNode
A parsed expression
-
-
Constructor Summary
Constructors Constructor Description ExpressionNodeComplex(ExpressionNode firstNode, ExpressionNodeWithParameter secondNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignValue(SymbolTable symbolTable, java.lang.Object value)
Assign a value to this expressionjava.lang.Object
calculate(SymbolTable symbolTable)
Calculate the expressionboolean
canBeAssigned()
Can this expression be assigned a value?java.lang.String
getDefinitionString()
Get a String that defines this expression node.
-
-
-
Constructor Detail
-
ExpressionNodeComplex
public ExpressionNodeComplex(ExpressionNode firstNode, ExpressionNodeWithParameter secondNode)
-
-
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
-
canBeAssigned
public boolean canBeAssigned()
Can this expression be assigned a value?- Specified by:
canBeAssigned
in interfaceExpressionNode
- Returns:
- true if it's possible to assign a value to this expression, false otherwise
-
assignValue
public void assignValue(SymbolTable symbolTable, java.lang.Object value) throws JmriException
Assign a value to this expression- Specified by:
assignValue
in interfaceExpressionNode
- Parameters:
symbolTable
- the symbol tablevalue
- the value to assign- 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
-
-