public class StackMachine.PushConstant extends java.lang.Object implements StackMachine.Instruction, java.io.Serializable
Constructor and Description |
---|
StackMachine.PushConstant(double value)
Creates a new
PushConstant instance. |
public StackMachine.PushConstant(double value)
PushConstant
instance.value
- a double
valuepublic int arity()
arity
method here.arity
in interface StackMachine.Instruction
int
valuepublic void execute() throws ParseException
execute
method here.execute
in interface StackMachine.Instruction
ParseException
- if an error occurspublic void write(java.io.PrintStream out)
write
method here.write
in interface StackMachine.Instruction
out
- a PrintStream
value