hussam.math.operations.factory
Class OperatorFactoryImpl<T extends Operator>
java.lang.Object
hussam.math.operations.factory.OperatorFactoryImpl<T>
- All Implemented Interfaces:
- OperatorFactory<T>, java.io.Serializable, java.lang.Comparable<Operator>
- Direct Known Subclasses:
- CustomFunctionFactory
public abstract class OperatorFactoryImpl<T extends Operator>
- extends java.lang.Object
- implements OperatorFactory<T>, java.lang.Comparable<Operator>
This is the default implemetation for all factories.
- Author:
- Hussam Almulhim حسام الملحم
- See Also:
OperatorFactoryDB
, CustomFunctionFactory
, Serialized Form
Constructor Summary |
---|
OperatorFactoryImpl(java.lang.String name, java.lang.String description) Construcs a new Factory with a default of 2 default arguemtn count. |
OperatorFactoryImpl(java.lang.String name, java.lang.String description, int arguments) Construcs a new Factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OperatorFactoryImpl
public OperatorFactoryImpl(java.lang.String name,
java.lang.String description,
int arguments)
- Construcs a new Factory.
- Parameters:
name
- The name of the factory.description
- descriptionarguments
- The default number of arguments.
OperatorFactoryImpl
public OperatorFactoryImpl(java.lang.String name,
java.lang.String description)
- Construcs a new Factory with a default of 2 default arguemtn count.
- Parameters:
name
- the name of the factory.description
- The description
getDefaultArgumentCount
public int getDefaultArgumentCount()
- Description copied from interface:
OperatorFactory
- Returns the default number of arguments for this operator.
- Specified by:
getDefaultArgumentCount
in interface OperatorFactory<T extends Operator>
- Returns:
- the default argument count for this operator.
getName
public java.lang.String getName()
- Description copied from interface:
OperatorFactory
- Returns the name of this operator.
- Specified by:
getName
in interface OperatorFactory<T extends Operator>
- Returns:
- The name of the factory.
getDescription
public java.lang.String getDescription()
- Description copied from interface:
OperatorFactory
- Returns a description of this operator.
- Specified by:
getDescription
in interface OperatorFactory<T extends Operator>
- Returns:
- a description.
compareTo
public int compareTo(Operator fac)
- Specified by:
compareTo
in interface java.lang.Comparable<Operator>
- Parameters:
fac
- The factory to be compared with. - Returns:
- -1,0,1
toString
public java.lang.String toString()
- Returns a description of this factory.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a description.