org.quattor.pan.dml.operators
Class IfElse
java.lang.Object
org.quattor.pan.dml.AbstractOperation
org.quattor.pan.dml.operators.IfElse
- All Implemented Interfaces:
- Operation
public final class IfElse
- extends AbstractOperation
Implements an if operation with an optional else clause.
- Author:
- loomis
newOperation
public static Operation newOperation(SourceRange sourceRange,
Operation... ops)
throws SyntaxException
- Throws:
SyntaxException
execute
public Element execute(Context context)
- Perform the if statement. It will pop a boolean from the data stack. If
that boolean is false the next operand if popped from the operand stack;
if true, nothing is done.
- Specified by:
execute in interface Operation- Specified by:
execute in class AbstractOperation
- Parameters:
context - evaluation context for the statement
- Returns:
- Element produced by running operation
Copyright © 2012 Quattor. All Rights Reserved.