fr.expression4j.core
Interface Catalog

All Known Implementing Classes:
CatalogImpl

public interface Catalog

Catalog of expressions. Manage a set of expressions. Used to parse or evaluate expression. Eache time the parser found a function in an expression, it check if it is define in the catalog given for the parsing.

Author:
SGINER

Method Summary
 void addConstant(java.lang.String name, MathematicalElement value)
          Add a constant to the catalog.
 void addExpression(Expression expression)
          add an expression to catalog.
 MathematicalElement getConstant(java.lang.String name)
          Get a constant from the catalog
 Expression getExpression(java.lang.String name)
          Get an expression from the catalog.
 java.lang.String getName()
          Get the catalog name.
 java.util.List listConstant()
          List all constant stored in catalog.
 java.util.List listExpression()
          List the content of the catalog
 

Method Detail

addExpression

void addExpression(Expression expression)
add an expression to catalog.

Parameters:
expression - expression to add.

getExpression

Expression getExpression(java.lang.String name)
Get an expression from the catalog.

Parameters:
name - name of the expression to get
Returns:
the expression if found, null otherwise.

listExpression

java.util.List listExpression()
List the content of the catalog

Returns:
list of functions name.

addConstant

void addConstant(java.lang.String name,
                 MathematicalElement value)
Add a constant to the catalog.

Parameters:
name - name of the constant.
value - value of the constant.

getConstant

MathematicalElement getConstant(java.lang.String name)
Get a constant from the catalog

Parameters:
name - constant name to get.
Returns:
the constant if found, null if not found.

listConstant

java.util.List listConstant()
List all constant stored in catalog.

Returns:
list of all constant stored in catalog a String.

getName

java.lang.String getName()
Get the catalog name.

Returns:
catalog name.