hussam.math.operations
Interface OperationGroup

All Superinterfaces:
java.lang.Cloneable, Operation, java.io.Serializable
All Known Implementing Classes:
MyGroup

public interface OperationGroup
extends Operation

This is an abstraction of a group of operations. You can see a group of operations in the form:

(5 , 7, x, 5+12)
As you can see they are seperated by commas.

See Also:
Function, MyGroup

Method Summary
 OperationgetOperation(int i)
          Returns the operation at the specified index.
 java.util.List<? extends Operation>getOperations()
          Returns the list of operations.
 OperationGroupoptimize()
          This method optimizes the operation.
 
Methods inherited from interface hussam.math.operations.Operation
clone, result
 

Method Detail

getOperations

java.util.List<? extends Operation> getOperations()
Returns the list of operations.

Returns:
The list of operations.

getOperation

Operation getOperation(int i)
Returns the operation at the specified index.

Parameters:
i - The index of the operation
Returns:
the operation.

optimize

OperationGroup optimize()
Description copied from interface: Operation
This method optimizes the operation. Optimization can increase compile time and decrease run time execution. This method should generate an operation that generate the same result(). This method is one of the main methods intruduced in Version 3 of the HussamMathParser package. It is also worth to note that this methods' implementation is optional! you can just return
this
.

Specified by:
optimize in interface Operation
Returns:
an optimized Operation of this operation.