math.numerics
Class MathExpParser

java.lang.Object
  extended by math.numerics.MathExpParser
All Implemented Interfaces:
Function, MultiVarFunction
Direct Known Subclasses:
SuryonoParser

public abstract class MathExpParser
extends java.lang.Object
implements Function, MultiVarFunction

MathExpParser defines an abstract super class for mathematical expression parsers.


Field Summary
static int NO_ERROR
          No error.
static int SYNTAX_ERROR
          Syntax error.
 
Constructor Summary
MathExpParser()
           
 
Method Summary
abstract  java.lang.String getFunction()
          Gets the function string.
abstract  void setFunction(java.lang.String funcStr)
          Parses the function string using existing variable names.
abstract  void setFunction(java.lang.String funcStr, java.lang.String[] vars)
          Parses the function string using existing variable names.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface math.numerics.Function
evaluate
 
Methods inherited from interface math.numerics.MultiVarFunction
evaluate
 

Field Detail

NO_ERROR

public static final int NO_ERROR
No error.

See Also:
Constant Field Values

SYNTAX_ERROR

public static final int SYNTAX_ERROR
Syntax error.

See Also:
Constant Field Values
Constructor Detail

MathExpParser

public MathExpParser()
Method Detail

setFunction

public abstract void setFunction(java.lang.String funcStr)
                          throws ParserException
Parses the function string using existing variable names.

Parameters:
funcStr - the function to be parsed
Throws:
ParserException

setFunction

public abstract void setFunction(java.lang.String funcStr,
                                 java.lang.String[] vars)
                          throws ParserException
Parses the function string using existing variable names.

Parameters:
funcStr - the function to be parsed
vars - the function's variables
Throws:
ParserException

getFunction

public abstract java.lang.String getFunction()
Gets the function string.