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

All Superinterfaces:
IAction, INRLAstNode, ISimpleAction

public interface IForEachAction
extends ISimpleAction

An iterative action that executes child actions over each member of a collection.

The context of each child action is the type being iterated over.


Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Method Summary
 IAction getAction()
          Return the action to execute on each member of the collection.
 IModelReference getCollection()
          Return the collection to iterate over.
 IVariable getVariable()
          If the for-each action introduces an iteration variable, this is returned here.
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
accept, dump, getColumn, getLine, getUserData, setUserData
 

Method Detail

getCollection

IModelReference getCollection()
Return the collection to iterate over. This is never null.

Returns:
the collection, an attribute or variable reference

getVariable

IVariable getVariable()
If the for-each action introduces an iteration variable, this is returned here. The iteration variable will be bound to each object being iterated over.

If the action uses a short form without a variable, for example for each trade, ..., then this returns null.

Returns:
the variable or null

getAction

IAction getAction()
Return the action to execute on each member of the collection. Is never null. This usually returns a ICompoundAction or a IConditionalAction.

Returns:
the action


Copyright © 2006-2010 Christian Nentwich and others