Package com.singularsys.jep.misc
Class CaseInsensitiveVariableTable
java.lang.Object
com.singularsys.jep.VariableTable
com.singularsys.jep.misc.CaseInsensitiveVariableTable
- All Implemented Interfaces:
JepComponent
,Serializable
A Variable table which ignores case.
The case of the first instance of each variable is preserved.
- Author:
- Richard Morris
- See Also:
-
Field Summary
Fields inherited from class com.singularsys.jep.VariableTable
table, vf
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionaddVariable
(String name) Adds a new variable with no value specified.addVariable
(String name, Object value) Adds a new variable with specified value.Returns a new empty VariableTable.getVariable
(String name) Gets an existing variable, returns null if variable is not found.Methods inherited from class com.singularsys.jep.VariableTable
addConstant, clear, clearValues, containsKey, containsVariable, copyConstantsFrom, copyVariablesFrom, getVariableFactory, getVariables, init, isEmpty, keySet, remove, remove, removeNonConstants, setVariableFactory, size, toString, values
-
Constructor Details
-
CaseInsensitiveVariableTable
public CaseInsensitiveVariableTable() -
CaseInsensitiveVariableTable
-
-
Method Details
-
addVariable
Adds a new variable with no value specified.- Overrides:
addVariable
in classVariableTable
- Parameters:
name
- variable name, will be converted to lower case- Returns:
- the variable
-
addVariable
Adds a new variable with specified value.- Overrides:
addVariable
in classVariableTable
- Parameters:
name
- variable name, will be converted to lower casevalue
- initial value- Returns:
- the variable
- Throws:
JepException
- if an attempt is made to set the value of a constant variable
-
getVariable
Gets an existing variable, returns null if variable is not found.- Overrides:
getVariable
in classVariableTable
- Parameters:
name
- variable name, will be converted to lower case- Returns:
- the variable
-
getLightWeightInstance
Description copied from class:VariableTable
Returns a new empty VariableTable.- Specified by:
getLightWeightInstance
in interfaceJepComponent
- Overrides:
getLightWeightInstance
in classVariableTable
- Returns:
- a new VariableTable
- See Also:
-