hussam.math.operations.extra
Class DynamicOperatorSourceWrapper

java.lang.Object
extended by hussam.math.operations.dataBase.OperatorSourceImpl
extended by hussam.math.operations.dataBase.OperatorSourceWrapper
extended by hussam.math.operations.extra.DynamicOperatorSourceWrapper
All Implemented Interfaces:
OperatorSource

public class DynamicOperatorSourceWrapper
extends OperatorSourceWrapper


Constructor Summary
DynamicOperatorSourceWrapper(OperatorSource source)
          Construcs a new DynamicOperatorSource with the the given sub source.
 
Method Summary
 OperatorFactory<Function>getFunctionFactory(java.lang.String name)
          Returns the factory for this Function.
 
Methods inherited from class hussam.math.operations.dataBase.OperatorSourceWrapper
getFunctionFactories, getGlobalVariable, getGlobalVariables, getInnerSource, getOperandFactories, getOperandFactory, toString
 
Methods inherited from class hussam.math.operations.dataBase.OperatorSourceImpl
addFunction, addFunctions, addGlobalVariable, addGlobalVariables, addLocalVariable, addLocalVariables, addOperand, addOperands, getLocalVariable, getLocalVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicOperatorSourceWrapper

public DynamicOperatorSourceWrapper(OperatorSource source)
Construcs a new DynamicOperatorSource with the the given sub source.

Parameters:
source - The inner source to be inserted.
Method Detail

getFunctionFactory

public OperatorFactory<Function> getFunctionFactory(java.lang.String name)
Returns the factory for this Function. First it seraches for the Factory inside this Source. If it does not find it, it will search the sub source inserted in this wrapper. If it does not find in the sub source. It will automatically create a Dynamic Function, and return it. This means that this method should never return null.

Specified by:
getFunctionFactory in interface OperatorSource
Overrides:
getFunctionFactory in class OperatorSourceWrapper
Parameters:
name - The name of the function.
Returns:
The function factory.