fr.expression4j.factory
Class OperatorFactory

java.lang.Object
  extended by fr.expression4j.factory.OperatorFactory

public class OperatorFactory
extends java.lang.Object

manage operators define by the framework.

Author:
SGINER

Constructor Summary
OperatorFactory()
           
 
Method Summary
static void addOperator(Operator operator)
           
static Operator createOperator(java.lang.String name, java.lang.String symbol, boolean isUnary)
          Create an operator.
static Operator getOperator(java.lang.String name)
          get the given operator name
static java.util.List getOperatorList()
          return operator list as String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorFactory

public OperatorFactory()
Method Detail

createOperator

public static Operator createOperator(java.lang.String name,
                                      java.lang.String symbol,
                                      boolean isUnary)
Create an operator.

Parameters:
name - operator name
symbol - symbol associated to the operator
isUnary - tel if operator is an unary operator or not.
Returns:
the created operator.

addOperator

public static void addOperator(Operator operator)

getOperatorList

public static java.util.List getOperatorList()
return operator list as String

Returns:
the operator list.

getOperator

public static Operator getOperator(java.lang.String name)
get the given operator name

Parameters:
name - name of the operator
Returns:
the requested operator if found, null otherwise.