Instructions Next: Instruction ClassUp: The Main SUGARCUBES ClassesPrevious: The Main SUGARCUBES Classes

Instructions

An instruction can be activated (activ method), reset (reset method), or forced to terminate (terminate method). Each activation returns TERM, STOP, or SUSP, three return codes defined in theReturnCodes  interface:

A call to the terminate method forces an instruction to completely terminate and therefore to return TERM when activated. A call to the reset method resets the instruction in its initial state.

Instruction implements Cloneable and thus instruction clones are available by the clone method.

Finally, equality of two instructions (equals method) and the toString method to print an instruction, are implemented.