org.shiwa.fgi.iwir
Class WhileTask

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.WhileTask

public class WhileTask
extends AbstractSimpleCompoundTask

The Class WhileTask.


Constructor Summary
WhileTask(java.lang.String name)
          Instantiates a new while task.
WhileTask(java.lang.String name, ConditionExpression condition)
          Instantiates a new while 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.
 boolean equals(java.lang.Object obj)
           
 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,...).
 ConditionExpression getCondition()
          Gets the condition.
 java.util.List<LoopPort> getLoopPorts()
          Returns a shallow copy of the loop ports of the task.
 java.util.List<UnionPort> getUnionPorts()
          Returns a shallow copy of the union ports of the task.
 int hashCode()
           
 void setCondition(ConditionExpression condition)
          Sets the condition.
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractSimpleCompoundTask
addTask, getBodyTasks, getChildren
 
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

WhileTask

public WhileTask(java.lang.String name)
Instantiates a new while task.

Parameters:
name - the name of the while task

WhileTask

public WhileTask(java.lang.String name,
                 ConditionExpression condition)
Instantiates a new while task.

Parameters:
name - the name of the while task
condition - the condition of the while task
Method Detail

getCondition

public ConditionExpression getCondition()
Gets the condition.

Returns:
the condition

setCondition

public void setCondition(ConditionExpression condition)
Sets the condition.

Parameters:
condition - the new condition

addLoopPort

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

Parameters:
loopPort - the loopport to add
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 unionport already exist, for example.

Parameters:
unionPort - the unionport to add
Throws:
NotWellFormedException

getLoopPorts

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

Returns:
the loop ports of the task

getUnionPorts

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

Returns:
the union ports 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

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractSimpleCompoundTask

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractSimpleCompoundTask