| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hussam.math.operations.dataBase.OperatorSourceImpl hussam.math.operations.dataBase.OperatorFactoryDB
public class OperatorFactoryDB
This is the default DataSource. It contains most used operands and Functions. If you wanted to add new Functions of Operands and make them public for every one, use this class direclty. other wise, wrap this DataSource using OperatorSourceWrapper
to have a different context.
To get the DataSource use: OperatorSource source = OperatorSourceDB.getInstance();as you can notice there is only one instance from this class.
You can also notice the inner operand classes, you can use them directly, however, it is always preferable to use getOperand()
OperatorSourceWrapper
Nested Class Summary | |
---|---|
static class | OperatorFactoryDB.CommaOperand This class was used in previous Versions of the ExpressionReader implementations. |
Field Summary | |
---|---|
static int | FALSE a flag indicating that the result of a logical operation is false value. |
static java.lang.String | PACKAGE_AUTHOR This is the name of the Author of the package. |
static java.lang.String | PACKAGE_NAME This is the package name. |
static java.lang.String | PACKAGE_VERSION This is the Package Version Number. |
static int | TRUE a flag indicating that the result of the logical operation is a true value. |
Method Summary | |
---|---|
java.util.Map<java.lang.String,OperatorFactory<? extends Operator>> | getAllFactories() Returns all Factories combined. |
OperatorFactory<Function> | getFunctionFactory(java.lang.String name) Returns the FunctionFactory for the given Function name. |
java.util.List<OperatorFactory<Function>> | getFunctions() |
static OperatorSourceImpl | getInstance() Returns the sole instance of this DataSource. |
Operand | getOperand(java.lang.String name) |
OperatorFactory<Operand> | getOperandFactory(java.lang.String name) Returns the factory for the given Operand. |
java.util.List<OperatorFactory<Operand>> | getOperands() |
static void | main(java.lang.String[] args) A test Method. |
Methods inherited from class hussam.math.operations.dataBase.OperatorSourceImpl |
---|
addFunction, addFunctions, addGlobalVariable, addGlobalVariables, addLocalVariable, addLocalVariables, addOperand, addOperands, getFunctionFactories, getGlobalVariable, getGlobalVariables, getLocalVariable, getLocalVariables, getOperandFactories, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TRUE
public static final int FALSE
public static final java.lang.String PACKAGE_AUTHOR
public static final java.lang.String PACKAGE_NAME
public static final java.lang.String PACKAGE_VERSION
Method Detail |
---|
public java.util.List<OperatorFactory<Operand>> getOperands()
public java.util.List<OperatorFactory<Function>> getFunctions()
public OperatorFactory<Operand> getOperandFactory(java.lang.String name)
OperatorSource
getOperandFactory
in interface OperatorSource
getOperandFactory
in class OperatorSourceImpl
name
- The name of the operand. public OperatorFactory<Function> getFunctionFactory(java.lang.String name)
OperatorSource
getFunctionFactory
in interface OperatorSource
getFunctionFactory
in class OperatorSourceImpl
name
- The name of the Function public Operand getOperand(java.lang.String name)
public static OperatorSourceImpl getInstance()
public java.util.Map<java.lang.String,OperatorFactory<? extends Operator>> getAllFactories()
public static void main(java.lang.String[] args)
args
- The test method does not use any arguments currently, can be null.
| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |