Class IfInstruction

  • All Implemented Interfaces:
    Cloneable

    public class IfInstruction
    extends ProgramInstruction

    This instruction an holds an if block and an else block and a criteria that determines which block will be executed. These blocks are Program objects that could contain nested if-else block. Therefore, this ProgramInstruction implements an arbitrarily deep if-else if-....else block.

    During processing, the Criteria is evaluated and if it evaluates to true, the "if" block is executed else the "else" block if there is one is executed. These programs are placed on the stack.