org.shiftone.bigcalc
Class StdFunctorFactory
java.lang.Object
org.shiftone.bigcalc.StdFunctorFactory
- All Implemented Interfaces:
- FunctorFactory
- public class StdFunctorFactory
- extends java.lang.Object
- implements FunctorFactory
This is the out-of-the-box FunctorFactory. Feel free to implement your own.
- Version:
- $Revision: 1.13 $
- 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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ADD
protected static final BinaryOperation ADD
SUBTRACT
protected static final BinaryOperation SUBTRACT
MULTIPLY
protected static final BinaryOperation MULTIPLY
DIVIDE
protected static final BinaryOperation DIVIDE
POWER
protected static final BinaryOperation POWER
AND
protected static final BinaryOperation AND
OR
protected static final BinaryOperation OR
NOT
protected static final UnaryOperation NOT
NEGATE
protected static final UnaryOperation NEGATE
EQUALS
protected static final BinaryOperation EQUALS
GT
protected static final BinaryOperation GT
GTOE
protected static final BinaryOperation GTOE
LT
protected static final BinaryOperation LT
LTOE
protected static final BinaryOperation LTOE
StdFunctorFactory
public StdFunctorFactory()
getAdd
public Functor getAdd(Functor lhs,
Functor rhs)
- Specified by:
getAdd
in interface FunctorFactory
getSubtract
public Functor getSubtract(Functor lhs,
Functor rhs)
- Specified by:
getSubtract
in interface FunctorFactory
getMultiply
public Functor getMultiply(Functor lhs,
Functor rhs)
- Specified by:
getMultiply
in interface FunctorFactory
getDivide
public Functor getDivide(Functor lhs,
Functor rhs)
- Specified by:
getDivide
in interface FunctorFactory
getPower
public Functor getPower(Functor lhs,
Functor rhs)
- Specified by:
getPower
in interface FunctorFactory
getAnd
public Functor getAnd(Functor lhs,
Functor rhs)
- Specified by:
getAnd
in interface FunctorFactory
getOr
public Functor getOr(Functor lhs,
Functor rhs)
- Specified by:
getOr
in interface FunctorFactory
getAssignment
public Functor getAssignment(java.lang.String text,
Functor rhs)
- Specified by:
getAssignment
in interface FunctorFactory
getEquals
public Functor getEquals(Functor lhs,
Functor rhs)
- Specified by:
getEquals
in interface FunctorFactory
getNotEquals
public Functor getNotEquals(Functor lhs,
Functor rhs)
- Specified by:
getNotEquals
in interface FunctorFactory
getGreaterThan
public Functor getGreaterThan(Functor lhs,
Functor rhs)
- Specified by:
getGreaterThan
in interface FunctorFactory
getGreaterThanOrEquals
public Functor getGreaterThanOrEquals(Functor lhs,
Functor rhs)
- Specified by:
getGreaterThanOrEquals
in interface FunctorFactory
getLessThan
public Functor getLessThan(Functor lhs,
Functor rhs)
- Specified by:
getLessThan
in interface FunctorFactory
getLessThanOrEquals
public Functor getLessThanOrEquals(Functor lhs,
Functor rhs)
- Specified by:
getLessThanOrEquals
in interface FunctorFactory
getDecimalLiteral
public Functor getDecimalLiteral(java.lang.String text)
- Specified by:
getDecimalLiteral
in interface FunctorFactory
getTextLiteral
public Functor getTextLiteral(java.lang.String text)
- Specified by:
getTextLiteral
in interface FunctorFactory
getBooleanLiteral
public Functor getBooleanLiteral(java.lang.String text)
- Specified by:
getBooleanLiteral
in interface FunctorFactory
getIntegerLiteral
public Functor getIntegerLiteral(java.lang.String text)
- Specified by:
getIntegerLiteral
in interface FunctorFactory
getVariable
public Functor getVariable(java.lang.String text)
- Specified by:
getVariable
in interface FunctorFactory
getNegate
public Functor getNegate(Functor functor)
- Specified by:
getNegate
in interface FunctorFactory
getNot
public Functor getNot(Functor functor)
- Specified by:
getNot
in interface FunctorFactory
getIfThenElse
public Functor getIfThenElse(Functor ifFunctor,
Functor thenFunctor,
Functor elseFunctor)
- Specified by:
getIfThenElse
in interface FunctorFactory