Package noaa.coastwatch.util.expression
Interface ParseImp
- All Known Implementing Classes:
ParseHelper
public interface ParseImp
The
ParseImp
class defines an interface for all
classes that help parse mathematical expressions by setting up a
correspondence between variable names and their type and index value.
The variable's index value will be used in the subsequent evaluation
operation to retrieve the variable value. The variable's type is used
in expression parsing to determine type conversions and the expression
output type.- Since:
- 3.4.0
- Author:
- Peter Hollemans
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
indexOfVariable
(String varName) Gets the index of the specified variable.typeOfVariable
(String varName) Gets the type of a variable as a primitive wrapper class name.
-
Method Details
-
indexOfVariable
Gets the index of the specified variable. The index is used to recall the variable value from anEvaluateImp
instance.- Parameters:
varName
- the variable name.- Returns:
- the variable index, or -1 if not available.
-
typeOfVariable
Gets the type of a variable as a primitive wrapper class name.- Parameters:
varName
- the variable name.- Returns:
- the variable class name: Byte, Short, Integer, Long, Float, or Double. The returned value is null if the variable type is unknown.
-