darwin.domain
Interface Program

All Known Implementing Classes:
MyProgram

public interface Program

This interface represents the sequence of Instructions in a Darwin program. Instruction step numbers begin at 1.


Method Summary
 void add(Instruction aInstruction)
          Add an Instruction to this Program.
 Instruction getInstruction(int aStep)
          Determine an Instruction from this Program.
 int getSize()
          Determine the number of Instructions in this Program.
 

Method Detail

add

public void add(Instruction aInstruction)
Add an Instruction to this Program.

Parameters:
aInstruction - the Instruction to add. aIntruction becomes the last Instruction of this Program.

getInstruction

public Instruction getInstruction(int aStep)
Determine an Instruction from this Program.

Parameters:
aStep - the step number of the Instruction. 1 <= aStep <= getSize().
Returns:
the Instruction at step aStep of this Program.

getSize

public int getSize()
Determine the number of Instructions in this Program.

Returns:
the number of instructions in this Program.