public class ExprAffectation extends AbstractScalarAssignment
intfloatbooleanstringint[]float[]boolean[]string[]var: variable has a ExpressionType.TYPE_DYNAMIC typec=a+b will return the evaluation of "a+b", and will set the value of the variable
c with the result.resultValueisLocalexprblock, rootSTRUCT_ARRAY, STRUCT_SCALAR, STRUCT_STRUCTURE, TYPE_BOOL, TYPE_DYNAMIC, TYPE_FLOAT, TYPE_INTEGER, TYPE_NUMERIC, TYPE_STRING, TYPE_UNDEF| Constructor and Description |
|---|
ExprAffectation(Expression root) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
java.lang.Object |
eval()
Evaluate the expression.
|
boolean |
evalAsBoolean()
Evaluate the expression as a boolean.
|
float |
evalAsFloat()
Evaluate the expression as a float.
|
int |
evalAsInt()
Evaluate the expression as an int.
|
java.lang.String |
getExpressionName()
Return the expression name.
|
getExpression, getResult, getResultStructure, getResultType, getVariable, setExpression, setResult, setResultaddLocalVariable, addLocalVariable, addVariable, addVariable, isCreated, isLocalgetVariablesgetParentBlock, getRoot, setParentBlock, setRootequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalVariable, getLocalVariables, getParentBlock, getRoot, getVariable, getVariables, hasVariable, hasVariable, removeVariable, setParentBlockpublic ExprAffectation(Expression root)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Expressionclone in class AbstractExpressionjava.lang.CloneNotSupportedExceptionpublic int evalAsInt()
ExpressionExpression.eval(), but the evaluation
engine will be able to optimize the computation by knwoing that the result is an int (primitive valeus are cached internally).evalAsInt in interface ExpressionevalAsInt in class AbstractExpressionpublic float evalAsFloat()
ExpressionExpression.eval(), but the evaluation
engine will be able to optimize the computation by knwoing that the result is a float (primitive valeus are cached internally).evalAsFloat in interface ExpressionevalAsFloat in class AbstractExpressionpublic boolean evalAsBoolean()
ExpressionExpression.eval(), but the evaluation
engine will be able to optimize the computation by knwoing that the result is a boolean (primitive valeus are cached internally).evalAsBoolean in interface ExpressionevalAsBoolean in class AbstractExpressionpublic java.lang.Object eval()
Expressionpublic java.lang.String getExpressionName()
ExpressionCopyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence