com.jp.comp.calculator
Interface InputOperation


public interface InputOperation

Processes calculator's input operation. All calculator's operations that responsible for input must implement this interface

See Also:
CalculatorPanel

Method Summary
 java.lang.Object processInput(CalculatorPanel aCalculatorPanel, java.lang.String aDisplayValue, java.lang.String anInputKey)
          Processes calculator's input operation.
 

Method Detail

processInput

public java.lang.Object processInput(CalculatorPanel aCalculatorPanel,
                                     java.lang.String aDisplayValue,
                                     java.lang.String anInputKey)
Processes calculator's input operation. Depending on the input operation and status of the calculator this method can return String or Double value. For example Sign (+/-) operation can change the sign for either the editing value (String) or result (Double)

Parameters:
aCalculatorPanel - CalculatorPanel instance
aDisplayValue - string presentation of current editing display value
anInputKey - pressed key
Returns:
a new display value