hussam.math.operations
Class OperationProxy
java.lang.Object
hussam.math.operations.OperationProxy
- All Implemented Interfaces:
- Operation
public class OperationProxy
- extends java.lang.Object
- implements Operation
This is a proxy to hide an Operation. The proxy operation takes an operation as argument. You can hide any operation inside this proxy. The implementation is only redirting to the hidden operation.
| Method Summary |
|---|
Operation | getOperation() Returns the hidden operation. |
double | result() Returns the hidden operation.result(). |
java.lang.String | toString() Returns the hidden operation.toString() |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OperationProxy
public OperationProxy(Operation o)
- Constructs a new Proxy given an operation to hide.
- Parameters:
o - The operation to be hidden.
result
public double result()
throws MathException- Returns the hidden operation.result().
- Specified by:
result in interface Operation
- Returns:
- The result value.
- Throws:
MathException - Throws MathException if there is a Math Exception!!
toString
public java.lang.String toString()
- Returns the hidden operation.toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- the hidden operation.toString();
getOperation
public Operation getOperation()
- Returns the hidden operation.
- Returns:
- The operation hidden.