hussam.math.operations
Class OperationProxy

java.lang.Object
extended by 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.


Constructor Summary
OperationProxy(Operation o)
          Constructs a new Proxy given an operation to hide.
 
Method Summary
 OperationgetOperation()
          Returns the hidden operation.
 doubleresult()
          Returns the hidden operation.result().
 java.lang.StringtoString()
          Returns the hidden operation.toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationProxy

public OperationProxy(Operation o)
Constructs a new Proxy given an operation to hide.

Parameters:
o - The operation to be hidden.
Method Detail

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.