This instruction an holds an if block and an else block and a criteria that determines which block will be executed. These blocks are {@link Program} objects that could containnested 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 {@link ProgramEnvironment#getProgramStack stack}.
This instruction holds a List of Criteria, and for each Criteria there is a {@link Program} that will be executed. Therefore, this ProcessorInstructionimplements an arbitrarily deep if-else if-....else block.
During processing, the Criteria are iterated through, in order. When one evaluates to true, that Criteria's Program is placed on to the Program {@link ProcessorEnvironment#getProgramStack stack}, and the loop is broken - this simulates the if-else if-... behavior. An optional "else" or "default" Program can be added via the {@link #addDefaultChoiceSubProgram addDefaultChoiceSubProgram} method - this is the optional "else" block at the end of an if-else if-... construct.
ifnull, ifeq
, etc.
@author Abe White
|
|