public class ExprArray extends AbstractExpression implements MultipleAryExpression
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Expression> |
exprs |
block, rootSTRUCT_ARRAY, STRUCT_SCALAR, STRUCT_STRUCTURE, TYPE_BOOL, TYPE_DYNAMIC, TYPE_FLOAT, TYPE_INTEGER, TYPE_NUMERIC, TYPE_STRING, TYPE_UNDEF| Constructor and Description |
|---|
ExprArray(Expression root) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExpression(Expression expr) |
java.lang.Object |
clone() |
java.lang.Object |
eval()
Evaluate the expression.
|
java.lang.String |
getExpressionName()
Return the expression name.
|
java.util.List<Expression> |
getExpressions() |
short |
getResultStructure()
Return the structure of the result for the expression.
|
short |
getResultType()
Return the type of the result for the expression.
|
java.util.Map<java.lang.String,Variable> |
getVariables()
Return the variables used by this expression.
|
void |
setExpressions(java.util.List<Expression> exprs) |
evalAsBoolean, evalAsFloat, evalAsInt, getParentBlock, getRoot, setParentBlock, setRootequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevalAsBoolean, evalAsFloat, evalAsInt, getExpression, getLocalVariable, getLocalVariables, getParentBlock, getRoot, getVariable, getVariable, getVariables, hasVariable, hasVariable, removeVariable, setParentBlockprotected java.util.List<Expression> exprs
public ExprArray(Expression root)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Expressionclone in class AbstractExpressionjava.lang.CloneNotSupportedExceptionpublic java.lang.String getExpressionName()
ExpressiongetExpressionName in interface Expressionpublic void addExpression(Expression expr)
addExpression in interface MultipleAryExpressionpublic void setExpressions(java.util.List<Expression> exprs)
setExpressions in interface MultipleAryExpressionpublic final java.lang.Object eval()
throws java.lang.ArithmeticException
Expressioneval in interface Expressionjava.lang.ArithmeticExceptionpublic short getResultType()
ExpressionExpressionType.TYPE_INTEGER: integerExpressionType.TYPE_FLOAT: floatExpressionType.TYPE_NUMERIC: integer or float value. The runtime actual type may depend on the expression argumentsExpressionType.TYPE_STRING: stringExpressionType.TYPE_DYNAMIC: dynamic type. The runtime actual type may depend on the expression argumentsExpressionType.TYPE_UNDEF: undefined type. The default type, characteristic of an error if entountered.getResultType in interface Expressionpublic short getResultStructure()
ExpressionExpressionType.STRUCT_SCALAR: a scalar valueExpressionType.STRUCT_ARRAY: an array valuegetResultStructure in interface Expressionpublic java.util.List<Expression> getExpressions()
getExpressions in interface MultipleAryExpressionpublic java.util.Map<java.lang.String,Variable> getVariables()
Expressionint c=a+b, only "a" and "b" will be returned.getVariables in interface ExpressionCopyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence