|
Venice 0.74beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnz.org.venice.parser.Variable
A representation of a variable in the Gondola language.
| Field Summary | |
static boolean |
CONSTANT
Indicates that the variable is constant and the value cannot be changed. |
static boolean |
VARIABLE
Indicates that the variable can be changed. |
| Constructor Summary | |
Variable(java.lang.String name,
int type,
boolean isConstant,
boolean isFunction,
double value)
Create a new variable. |
|
Variable(java.lang.String name,
int type,
boolean isConstant,
double value)
Create a new variable. |
|
| Method Summary | |
java.lang.Object |
clone()
|
java.lang.String |
getName()
Return the name of the variable. |
int |
getType()
Return the type of the variable. |
double |
getValue()
Return the value of the variable. |
boolean |
isConstant()
Return whether the variable is a constant. |
boolean |
isFunction()
Return whether the variable is a function. |
void |
setValue(double value)
Set the value of the variable. |
void |
setValue(int value)
Set the value of the variable. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean CONSTANT
public static final boolean VARIABLE
| Constructor Detail |
public Variable(java.lang.String name,
int type,
boolean isConstant,
double value)
name - the name of the variable.type - the type of the variable, one of Expression.BOOLEAN_TYPE,
Expression.FLOAT_TYPE or Expression.INTEGER_TYPE.isConstant - whether the variable is constant. Either @{link CONSTANT} or
VARIABLE.value - the initial value of the variable.
public Variable(java.lang.String name,
int type,
boolean isConstant,
boolean isFunction,
double value)
name - the name of the variable.type - the type of the variable, one of Expression.BOOLEAN_TYPE,
Expression.FLOAT_TYPE or Expression.INTEGER_TYPE.isConstant - whether the variable is constant. Either @{link CONSTANT} or
VARIABLE.value - the initial value of the variable.| Method Detail |
public java.lang.String getName()
public int getType()
public boolean isConstant()
TRUE iff the variable is a constant.public boolean isFunction()
TRUE iff the variable is function constant.public double getValue()
public void setValue(double value)
value - the new value.public void setValue(int value)
value - the new value.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
|
Venice 0.74beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||