Interface Operation

All Known Subinterfaces:
All Known Implementing Classes:
Add, Add, ChangeSigns, ChangeSigns, ClearStack, ClearStack, ConvertBase, Divide, Divide, Multiply, Multiply, Pop, Pop, Power, Power, Push, Push, Remainder, Remainder, RotateDown, RotateDown, RotateUp, RotateUp, Subtract, Subtract, TenToPower, TenToPower, TwoToPower, TwoToPower

public interface Operation

An interface abstracting any operation. The operation may be explicitly encoded in an implementing subclass, or may defer the operation to some method receiving the Operation as a parameter. Arithmetic operations should be encoded explicitly; in this case, subclasses should implement EncodedOperation. In this way, the encoding of an arithmetic operation can be decoupled from the control of evaluation order.

Rod Howell (

Method Summary
 int numOperands()
          Returns the number of operands required by this Operation.

Method Detail


public int numOperands()
Returns the number of operands required by this Operation.