fr.expression4j.core
Interface Expression

All Known Implementing Classes:
AbsFunction, AbstractFunction, AcosFunction, AsinFunction, AtanFunction, CeilFunction, CosFunction, CoshFunction, ExpFunction, ExpressionImpl, FloorFunction, LogFunction, OptimizedExpression, RandomFunction, SinFunction, SinhFunction, SqrtFunction, TanFunction

public interface Expression

Manage mathematic expression.

Author:
SGINER

Method Summary
 MathematicalElement evaluate(OperatorManager operatorManager, Parameters parameters)
          Evaluate the value of the expression.
 MathematicalElement evaluate(Parameters parameters)
          Evaluate the value of the expression with the default operator manager.
 Catalog getCatalog()
          return the catalog of the expression.
 ExpressionModel getExpressionModel()
          Return the expression model associated to the expression.
 java.lang.String getName()
          Get the name of the function.
 java.util.List getParameters()
          Get the parameter list associated to the function.
 

Method Detail

getCatalog

Catalog getCatalog()
return the catalog of the expression.

Returns:
catalog of current expression, null if no catalog is needed of define.

evaluate

MathematicalElement evaluate(Parameters parameters)
                             throws EvalException
Evaluate the value of the expression with the default operator manager.

Parameters:
parameters - parameters values for evaluating expression.
Returns:
value of the evaluated expression as a double.
Throws:
EvalException - when error occurd (parameter not found ...)

evaluate

MathematicalElement evaluate(OperatorManager operatorManager,
                             Parameters parameters)
                             throws EvalException
Evaluate the value of the expression.

Parameters:
operatorManager - operator manager to use to evaluate expression.
parameters - parameters values for evaluating expression.
Returns:
value of the evaluated expression as a double.
Throws:
EvalException - when error occurd (parameter not found ...)

getParameters

java.util.List getParameters()
Get the parameter list associated to the function. If function is f(x,y,z), parameter list is an ordered list of String with "x", "y" and "z".

Returns:
parameter list associated to the expression.

getName

java.lang.String getName()
Get the name of the function. If function is f(x,y,z), name if "f".

Returns:
name of the function.

getExpressionModel

ExpressionModel getExpressionModel()
Return the expression model associated to the expression.

Returns:
expression model associated to the expression.