Inherits org.qscript.Argument.
Inherited by org.qscript.Thing.
Public Member Functions | |
Variable (String identifier) | |
Variable (String identifier, Object value) | |
Variable (Variable v) | |
String | getIdentifier () |
boolean | isArgument () |
boolean | isVariable () |
String | forListing () |
String | toString () |
Public Member Functions inherited from org.qscript.Argument | |
Argument (Object v) | |
boolean | equals (Object o) |
Object | getValue () |
boolean | isArgument () |
boolean | isNan () |
Vector | toVector_ () throws EvaluationException |
Vector | toVector () |
Complex | toComplex_ () throws EvaluationException |
Complex | toComplex () |
boolean | toBoolean_ () throws EvaluationException |
boolean | toBoolean () |
double | toDouble_ () throws EvaluationException |
double | toDouble () |
float | toFloat_ () throws EvaluationException |
float | toFloat () |
int | toInteger_ () throws EvaluationException |
int | toInteger () |
String | toString () |
Public Member Functions inherited from org.qscript.Token | |
void | setTextPosition (int charStart, int charWidth) |
void | setTextPosition (int line, int charStart, int charWidth) |
int | getLine () |
int | getCharStart () |
int | getCharWidth () |
boolean | isArgument () |
boolean | isFlowAction () |
boolean | isVariable () |
boolean | isThing () |
boolean | isOperator () |
boolean | isFlowOperator () |
String | forListing () |
Protected Attributes | |
final String | identifier |
Protected Attributes inherited from org.qscript.Token | |
int | line |
int | charStart |
int | charWidth |
Additional Inherited Members | |
Public Attributes inherited from org.qscript.Argument | |
final boolean | isNull |
final boolean | isString |
final boolean | isInteger |
final boolean | isDouble |
final boolean | isBoolean |
final boolean | isVector |
final boolean | isComplex |
final boolean | isThing |
final boolean | isNumeric |
Static Public Attributes inherited from org.qscript.Token | |
static final Token | DUMMY = new Argument(null) |
Protected Member Functions inherited from org.qscript.Token | |
Token () | |
This is a type of 'argument' but has an identifier which can be used in an algorithm to access the value.
In version 1 the variable identifier had to start with a $ symbol but this is no longer the case with this version.
org.qscript.Variable.Variable | ( | String | identifier | ) |
Create a variable with a given identifier.
identifier | variable name |
org.qscript.Variable.Variable | ( | String | identifier, |
Object | value | ||
) |
Create a variable with a given identifier and initialise with the specified value.
identifier | variable name |
value | the initial value |
org.qscript.Variable.Variable | ( | Variable | v | ) |
Make a copy of the variable
v | the variable to copy |
String org.qscript.Variable.forListing | ( | ) |
Used in Script and Parser classes when listing
String org.qscript.Variable.getIdentifier | ( | ) |
Get the name (identifier) of this variable
boolean org.qscript.Variable.isArgument | ( | ) |
Returns false
boolean org.qscript.Variable.isVariable | ( | ) |
Returns true
String org.qscript.Variable.toString | ( | ) |
Returns a String representation of the identifier and current value (null if invalid).