public class ValueList extends Object implements Expression
| Constructor and Description |
|---|
ValueList(boolean keepCommas)
Creates a new and empty value list
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Expression element)
Adds the given element to the list.
|
Expression |
eval(Scope scope,
Generator gen)
If possible the expression is evaluated and a simplified expression is returned.
|
List<Expression> |
getElements()
Returns the contents of the value list.
|
boolean |
isConstant()
Determines if this expression is constant or if it depends on variables.
|
String |
toString() |
public ValueList(boolean keepCommas)
keepCommas - determines if commas are kept in the output or notpublic void add(Expression element)
element - the element to addpublic List<Expression> getElements()
public boolean isConstant()
ExpressionisConstant in interface Expressionpublic Expression eval(Scope scope, Generator gen)
Expressioneval in interface Expressionscope - the scope used to resolve variables.gen - the generator used to evaluate functionsCopyright © 2016. All rights reserved.