modesteditor.core.stepsimulation
Class AltNode

java.lang.Object
  extended by modesteditor.core.stepsimulation.SimulationNode
      extended by modesteditor.core.stepsimulation.AltNode
Direct Known Subclasses:
DoNode, PaltNode

public class AltNode
extends SimulationNode

Class representing an alt statement in the step simulation tree.


Field Summary
protected  SimulationNode activeChild
          The active child, only one since sequential
 
Fields inherited from class modesteditor.core.stepsimulation.SimulationNode
alphabet, children, column, guard, hidden, isActive, length, line, newLabel, parent
 
Constructor Summary
AltNode(int line, int column, SimulationNode parent)
          Default constructor.
 
Method Summary
 void childIsFinished(SimulationNode child)
          Child notifies the parent that is is finished.
 java.util.List<ParTransition> collectParTransitions()
          Abstract method for generating the list of parallel transitions of the node.
 java.util.List<SimulationNode> collectTransitions()
          Method collects all children if not a child is already active
 void generateAlphabet()
          Abstract method to generate the alphabet of the node.
 java.util.ArrayList<SimulationNode> getParentList()
           
 void isFinished()
          Method called when the node is completely processed
 void notificationOfChildActivity(SimulationNode child)
          Method which is called from the child in order to notify the parent that it is active.
 void releaseTransitions()
          Method shall release the active transitions of the node an it's children in case a do loop is broken or a STOP occured ...
 void setActive()
          Sets the node active and all children in the children list
 void takeTransition()
          No transition to be taken, only child can be consumed.
 
Methods inherited from class modesteditor.core.stepsimulation.SimulationNode
addChild, breakTransitionTaken, createSimHighlighting, exceptionThrown, getAlphabet, getColumn, getGuard, getLength, getLine, getName, getParent, hide, isActive, isHidden, printTransition, relabelNode, setParent, stopCalled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeChild

protected SimulationNode activeChild
The active child, only one since sequential

Constructor Detail

AltNode

public AltNode(int line,
               int column,
               SimulationNode parent)
Default constructor.

Parameters:
line -
column -
parent -
Method Detail

setActive

public void setActive()
Sets the node active and all children in the children list

Overrides:
setActive in class SimulationNode

childIsFinished

public void childIsFinished(SimulationNode child)
Description copied from class: SimulationNode
Child notifies the parent that is is finished. Parent has to check if it is finished too.

Specified by:
childIsFinished in class SimulationNode

isFinished

public void isFinished()
Description copied from class: SimulationNode
Method called when the node is completely processed

Overrides:
isFinished in class SimulationNode

collectTransitions

public java.util.List<SimulationNode> collectTransitions()
Method collects all children if not a child is already active

Specified by:
collectTransitions in class SimulationNode
Returns:
the list of transitions

collectParTransitions

public java.util.List<ParTransition> collectParTransitions()
Description copied from class: SimulationNode
Abstract method for generating the list of parallel transitions of the node. The method also adds disabled transitions for the letters in the alphabet that cannot be taken.

Specified by:
collectParTransitions in class SimulationNode
Returns:
the list of parallel transitions

generateAlphabet

public void generateAlphabet()
Description copied from class: SimulationNode
Abstract method to generate the alphabet of the node.

Specified by:
generateAlphabet in class SimulationNode

takeTransition

public void takeTransition()
No transition to be taken, only child can be consumed.

Specified by:
takeTransition in class SimulationNode

releaseTransitions

public void releaseTransitions()
Description copied from class: SimulationNode
Method shall release the active transitions of the node an it's children in case a do loop is broken or a STOP occured ...

Specified by:
releaseTransitions in class SimulationNode

notificationOfChildActivity

public void notificationOfChildActivity(SimulationNode child)
Description copied from class: SimulationNode
Method which is called from the child in order to notify the parent that it is active.

Specified by:
notificationOfChildActivity in class SimulationNode

getParentList

public java.util.ArrayList<SimulationNode> getParentList()
Overrides:
getParentList in class SimulationNode