public interface VariableMap
The methods may throw ExecutionException. The interface provides this
possibility to implement features like denying case sensitive reuse of
variable names. For example jScriptBasic does not allow you to use the
variable Apple is ever you already used apple. In other basic
implementations the casing is insensitive and the two variable names are the
same. Other languages treat Apple and apple as two different
variables. jScriptBasic believes that both practices are bad.
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getVariableNameSet()
Get the set of the variables stored in the variable map so that the
caller can iterate through the variables.
|
RightValue |
getVariableValue(String variableName)
Get the value of a variable.
|
void |
setVariable(String variableName,
RightValue rightValue)
Set the value of the variable.
|
Boolean |
variableDefined(String variableName)
Checks that a variable exists and has a defined value in this map.
|
Boolean |
variableExists(String variableName)
Checks that a variable exists in this map.
|
RightValue getVariableValue(String variableName) throws ExecutionException
variableName - null if the variable
is not defined or does not exists.ExecutionExceptionBoolean variableExists(String variableName) throws ExecutionException
variableName - true if the variable exists, even if the variable has
undefined value. false if the variable does not exist in
this map.ExecutionExceptionBoolean variableDefined(String variableName) throws ExecutionException
null.variableName - true if the variable exists and has a defined value.ExecutionExceptionvoid setVariable(String variableName, RightValue rightValue) throws ExecutionException
You can set a variable to undefined passing null to this method
as rightValue.
variableName - rightValue - the new value of the variableExecutionExceptionCopyright © 2013 Verhas and Verhas Software Craftsmen. All Rights Reserved.