public class ParseHelper extends java.lang.Object implements ParseImp, EvaluateImp
ParseHelper
class implements the ParseImp
and
EvaluateImp
interfaces with simple data structures. All variables
are reported by typeOfVariable(java.lang.String)
as having type Double, and only
the getDoubleProperty(int)
method is allowed to be used, all others
will throw an exception. The public data
field can be used to
set values for all variables to be used in an evaluation.Modifier and Type | Field and Description |
---|---|
double[] |
data
The data values to use in evaluation.
|
Constructor and Description |
---|
ParseHelper(java.util.List<java.lang.String> nameList)
Creates a new
ParseHelper . |
Modifier and Type | Method and Description |
---|---|
double |
getDoubleProperty(int varIndex) |
int |
indexOfVariable(java.lang.String varName)
Gets the index of the specified variable.
|
java.lang.String |
typeOfVariable(java.lang.String varName)
Gets the type of a variable as a primitive wrapper class name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getByteProperty, getFloatProperty, getIntegerProperty, getLongProperty, getShortProperty
public ParseHelper(java.util.List<java.lang.String> nameList)
ParseHelper
.nameList
- the list of valid variable names.public int indexOfVariable(java.lang.String varName)
ParseImp
EvaluateImp
instance.indexOfVariable
in interface ParseImp
varName
- the variable name.public java.lang.String typeOfVariable(java.lang.String varName)
ParseImp
typeOfVariable
in interface ParseImp
varName
- the variable name.public double getDoubleProperty(int varIndex)
getDoubleProperty
in interface EvaluateImp