com.japisoft.formula.operator
Class OperatorFactoryImpl

java.lang.Object
  extended bycom.japisoft.formula.operator.OperatorFactoryImpl
All Implemented Interfaces:
OperatorFactory
Direct Known Subclasses:
OperatorFactory_hpImpl

public class OperatorFactoryImpl
extends java.lang.Object
implements OperatorFactory

This factory provides operators for the simple precison mode. This is called for building the syntax tree. User can override any operators or add its own operators here.

Version:
1.0
Author:
(c) 2004 JAPISoft / http://www.japisoft.com

Constructor Summary
OperatorFactoryImpl()
           
 
Method Summary
 BinaryOperator getBinaryOperator(java.lang.String name)
           
 TernaryOperator getTernaryOperator(java.lang.String name)
           
 UnaryOperator getUnaryOperator(java.lang.String name)
           
protected  void init()
           
 void setBinaryOperator(java.lang.String name, BinaryOperator operator)
          Replace an operator by this one, if the operator is null the operator will be removed
 void setTernaryOperator(java.lang.String name, TernaryOperator operator)
          Replace an operator by this one, if the operator is null the operator will be removed
 void setUnaryOperator(java.lang.String name, UnaryOperator operator)
          Replace an operator by this one, if the operator is null the operator will be removed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorFactoryImpl

public OperatorFactoryImpl()
Method Detail

init

protected void init()

getUnaryOperator

public UnaryOperator getUnaryOperator(java.lang.String name)
Specified by:
getUnaryOperator in interface OperatorFactory
Returns:
an unary operator for the following name

getBinaryOperator

public BinaryOperator getBinaryOperator(java.lang.String name)
Specified by:
getBinaryOperator in interface OperatorFactory
Returns:
a binary operator for the following name

getTernaryOperator

public TernaryOperator getTernaryOperator(java.lang.String name)
Specified by:
getTernaryOperator in interface OperatorFactory
Returns:
a ternary operator for the following name

setUnaryOperator

public void setUnaryOperator(java.lang.String name,
                             UnaryOperator operator)
Replace an operator by this one, if the operator is null the operator will be removed

Specified by:
setUnaryOperator in interface OperatorFactory

setBinaryOperator

public void setBinaryOperator(java.lang.String name,
                              BinaryOperator operator)
Replace an operator by this one, if the operator is null the operator will be removed

Specified by:
setBinaryOperator in interface OperatorFactory

setTernaryOperator

public void setTernaryOperator(java.lang.String name,
                               TernaryOperator operator)
Replace an operator by this one, if the operator is null the operator will be removed

Specified by:
setTernaryOperator in interface OperatorFactory