org.shiwa.fgi.iwir
Class ForTask

java.lang.Object
  extended by org.shiwa.fgi.iwir.AbstractTask
      extended by org.shiwa.fgi.iwir.AbstractCompoundTask
          extended by org.shiwa.fgi.iwir.AbstractSimpleCompoundTask
              extended by org.shiwa.fgi.iwir.ForTask

public class ForTask
extends AbstractSimpleCompoundTask

The Class ForTask executes its body multiple times determined by a LoopCounter.


Constructor Summary
ForTask(java.lang.String name)
          Instantiates a new for task.
 
Method Summary
 void addLoopPort(LoopPort loopPort)
          Adds an additional loop port to the task.
 void addUnionPort(UnionPort unionPort)
          Adds an additional union port to the task.
 java.util.List<AbstractDataPort> getAllInputPorts()
          Returns a list of all input ports (inputPort, loopPoort,...).
 java.util.List<AbstractDataPort> getAllOutputPorts()
          Returns a list of all output ports (outputPort, unionPort,...).
 LoopCounter getLoopCounter()
          Gets the loop counter of the task.
 java.util.List<LoopPort> getLoopPorts()
          Returns a shallow copy of the loop ports.
 java.util.List<UnionPort> getUnionPorts()
          Returns a shallow copy of the union ports.
 void setLoopCounter(LoopCounter loopCounter)
          Sets the new loop counter for the task.
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractSimpleCompoundTask
addTask, equals, getBodyTasks, getChildren, hashCode
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractCompoundTask
addLink, addLink, getControlLinks, getDataLinks, getLinks
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractTask
addConstraint, addInputPort, addOutputPort, addProperty, getConstraints, getInputPorts, getName, getOutputPorts, getParentTask, getPort, getProperties, getUniqueId, isTopLevelTask, removeProperty, setPortValue, setPortValue, setPortValue, setPortValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForTask

public ForTask(java.lang.String name)
Instantiates a new for task.

Parameters:
name - the name of the for task
Method Detail

addLoopPort

public void addLoopPort(LoopPort loopPort)
                 throws NotWellFormedException
Adds an additional loop port to the task. Throws a NotWellFormedException if loop port already exist, for example.

Parameters:
loopPort - the loop port to add to the task
Throws:
NotWellFormedException - the not well formed exception

setLoopCounter

public void setLoopCounter(LoopCounter loopCounter)
Sets the new loop counter for the task.

Parameters:
loopCounter - the new loop counter for the task
Throws:
NotWellFormedException - the not well formed exception

addUnionPort

public void addUnionPort(UnionPort unionPort)
                  throws NotWellFormedException
Adds an additional union port to the task. Throws a NotWellFormedException if union port already exist, for example.

Parameters:
unionPort - the union port to add to the task
Throws:
NotWellFormedException

getLoopPorts

public java.util.List<LoopPort> getLoopPorts()
Returns a shallow copy of the loop ports. Returns an empty list if no loop port exists.

Returns:
the loop ports of the task

getUnionPorts

public java.util.List<UnionPort> getUnionPorts()
Returns a shallow copy of the union ports. Returns an empty list if no union ports exists.

Returns:
the union ports of the task

getLoopCounter

public LoopCounter getLoopCounter()
Gets the loop counter of the task. Returns null if no loop counter exists.

Returns:
the loop counter of the task

getAllInputPorts

public java.util.List<AbstractDataPort> getAllInputPorts()
Description copied from class: AbstractTask
Returns a list of all input ports (inputPort, loopPoort,...). For the loopCounter its ports (from,to,step) are added, if they exist.

Specified by:
getAllInputPorts in class AbstractTask
Returns:
the all input ports

getAllOutputPorts

public java.util.List<AbstractDataPort> getAllOutputPorts()
Description copied from class: AbstractTask
Returns a list of all output ports (outputPort, unionPort,...).

Specified by:
getAllOutputPorts in class AbstractTask
Returns:
the all input ports