hussam.math.operations.parser
Class ExpressionReader
java.lang.Object
hussam.math.operations.parser.ExpressionReader
- All Implemented Interfaces:
- OperationReader
- Direct Known Subclasses:
- DynamicExpressionReader, SmartExpressionReader
public abstract class ExpressionReader
- extends java.lang.Object
- implements OperationReader
an Abstract class, This class is used to refference the most advanced OperationReader. Currently the getInstance() method returns a new SmartExpressionReader Most classes in operations packages use this method to get an instance of an OperationReader. You should always use This class's getInstance() to get the best ExpressionReader. This will help you to have a one point access for readers. It is always better not to use MyReader, MyExpressionReader, or SmartExpressionReader directly. Use this class Better.
The Current implementation returns an OperationReader
that will automatically read new Variables.
However, if it reads a new Function, it will throw
an UnknownExpressionArgumentException.
Before you read an operation, make sure that all functions
used are in the OperatorSource
of the ExpressionReader.
Use the DynamicExpressionReader if you needed to create
Functions dynamically.
- See Also:
DynamicExpressionReader
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionReader
protected ExpressionReader()
getInstance
public static ExpressionReader getInstance()
- Returns a new instance of an OperationReader. The returned OperationReader should have the most features.
- Returns:
- an OperationReader.
getInstance
public static ExpressionReader getInstance(OperationsParser parser,
OperatorSource source)
- Returns a new instance of an OperationReader.
- Returns:
- an OperationReader.