com.rychlik.calculator
Class StackMachine.PushVariable

java.lang.Object
  extended by com.rychlik.calculator.StackMachine.PushVariable
All Implemented Interfaces:
StackMachine.Instruction, java.io.Serializable
Enclosing class:
StackMachine

public class StackMachine.PushVariable
extends java.lang.Object
implements StackMachine.Instruction, java.io.Serializable

Push value of a variable on stack.

See Also:
Serialized Form

Constructor Summary
StackMachine.PushVariable(int address)
          Creates a new PushVariable instance.
 
Method Summary
 int arity()
          Describe arity method here.
 void execute()
          Describe execute method here.
 void write(java.io.PrintStream out)
          Describe write method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackMachine.PushVariable

public StackMachine.PushVariable(int address)
Creates a new PushVariable instance.

Parameters:
address - an int value
Method Detail

arity

public int arity()
Describe arity method here.

Specified by:
arity in interface StackMachine.Instruction
Returns:
an int value

execute

public void execute()
             throws ParseException
Describe execute method here.

Specified by:
execute in interface StackMachine.Instruction
Throws:
ParseException - if an error occurs

write

public void write(java.io.PrintStream out)
Describe write method here.

Specified by:
write in interface StackMachine.Instruction
Parameters:
out - a PrintStream value