public class BasicVariables extends Object implements Variables
| Constructor and Description |
|---|
BasicVariables() |
| Modifier and Type | Method and Description |
|---|---|
void |
declareVariable(String varName,
Object value)
Defines a new variable with the specified value or modifies
the value of an existing variable.
|
Object |
getVariable(String varName)
Returns the value of the variable if it is defined,
otherwise, throws IllegalArgumentException
|
boolean |
isDeclaredVariable(String varName)
Returns true if the variable has been defined, even if the
value of the variable is null.
|
String |
toString() |
void |
undeclareVariable(String varName)
Removes an existing variable.
|
public boolean isDeclaredVariable(String varName)
isDeclaredVariable in interface VariablesvarName - is a variable name without the "$" signpublic Object getVariable(String varName)
getVariable in interface VariablesvarName - is a variable name without the "$" signpublic void declareVariable(String varName, Object value)
declareVariable in interface VariablesvarName - is a variable name without the "$" signvalue - is the new value for the variable, which can be nullpublic void undeclareVariable(String varName)
undeclareVariable in interface VariablesvarName - is a variable name without the "$" signCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.