net.sourceforge.nrl.parser.ast.action
Interface IConditionalAction

All Superinterfaces:
IAction, INRLAstNode, ISimpleAction

public interface IConditionalAction
extends ISimpleAction

An if-then-else type action. If the "if" part, which is an NRL IConstraint, holds true, the "then" actions are executed, else the "else" actions are executed.


Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Method Summary
 ICompoundAction getElse()
          Return the actions to execute if the condition does not hold.
 IConstraint getIf()
          Returns the condition.
 ICompoundAction getThen()
          Return the actions to execute if the condition holds.
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
accept, dump, getColumn, getLine, getUserData, setUserData
 

Method Detail

getIf

IConstraint getIf()
Returns the condition. This is a boolean constraint, as enforced by the type checker.

Returns:
the condition

getThen

ICompoundAction getThen()
Return the actions to execute if the condition holds. This is never null.

Returns:
the actions

getElse

ICompoundAction getElse()
Return the actions to execute if the condition does not hold. NOTE: this may be null if there is no else part.

Returns:
the actions or null


Copyright © 2006-2010 Christian Nentwich and others