org.shiftone.bigcalc
Interface FunctorFactory

All Known Implementing Classes:
StdFunctorFactory

public interface FunctorFactory

when expressions are being parsed, the parser makes callbacks to implementation of this interface to create the necessary functors. This provides a level of flexability if it's necessary to override the behavior of one or several functors.

This may be useful to allow a new data type to be operated on.

Version:
$Revision: 1.11 $
Author:
$Author: jeffdrost $

Method Summary
 Functor getAdd(Functor lhs, Functor rhs)
           
 Functor getAnd(Functor lhs, Functor rhs)
           
 Functor getAssignment(java.lang.String text, Functor rhs)
           
 Functor getBooleanLiteral(java.lang.String text)
           
 Functor getDecimalLiteral(java.lang.String text)
           
 Functor getDivide(Functor lhs, Functor rhs)
           
 Functor getEquals(Functor lhs, Functor rhs)
           
 Functor getGreaterThan(Functor lhs, Functor rhs)
           
 Functor getGreaterThanOrEquals(Functor lhs, Functor rhs)
           
 Functor getIfThenElse(Functor ifFunctor, Functor thenFunctor, Functor elseFunctor)
           
 Functor getIntegerLiteral(java.lang.String text)
           
 Functor getLessThan(Functor lhs, Functor rhs)
           
 Functor getLessThanOrEquals(Functor lhs, Functor rhs)
           
 Functor getMultiply(Functor lhs, Functor rhs)
           
 Functor getNegate(Functor functor)
           
 Functor getNot(Functor functor)
           
 Functor getNotEquals(Functor lhs, Functor rhs)
           
 Functor getOr(Functor lhs, Functor rhs)
           
 Functor getPower(Functor lhs, Functor rhs)
           
 Functor getSubtract(Functor lhs, Functor rhs)
           
 Functor getTextLiteral(java.lang.String text)
           
 Functor getVariable(java.lang.String text)
           
 

Method Detail

getAdd

public Functor getAdd(Functor lhs,
                      Functor rhs)

getSubtract

public Functor getSubtract(Functor lhs,
                           Functor rhs)

getMultiply

public Functor getMultiply(Functor lhs,
                           Functor rhs)

getDivide

public Functor getDivide(Functor lhs,
                         Functor rhs)

getPower

public Functor getPower(Functor lhs,
                        Functor rhs)

getAnd

public Functor getAnd(Functor lhs,
                      Functor rhs)

getOr

public Functor getOr(Functor lhs,
                     Functor rhs)

getAssignment

public Functor getAssignment(java.lang.String text,
                             Functor rhs)

getEquals

public Functor getEquals(Functor lhs,
                         Functor rhs)

getNotEquals

public Functor getNotEquals(Functor lhs,
                            Functor rhs)

getGreaterThan

public Functor getGreaterThan(Functor lhs,
                              Functor rhs)

getGreaterThanOrEquals

public Functor getGreaterThanOrEquals(Functor lhs,
                                      Functor rhs)

getLessThan

public Functor getLessThan(Functor lhs,
                           Functor rhs)

getLessThanOrEquals

public Functor getLessThanOrEquals(Functor lhs,
                                   Functor rhs)

getIfThenElse

public Functor getIfThenElse(Functor ifFunctor,
                             Functor thenFunctor,
                             Functor elseFunctor)

getDecimalLiteral

public Functor getDecimalLiteral(java.lang.String text)

getTextLiteral

public Functor getTextLiteral(java.lang.String text)

getBooleanLiteral

public Functor getBooleanLiteral(java.lang.String text)

getIntegerLiteral

public Functor getIntegerLiteral(java.lang.String text)

getVariable

public Functor getVariable(java.lang.String text)

getNegate

public Functor getNegate(Functor functor)

getNot

public Functor getNot(Functor functor)