UML.Semantic.BehavioralElements.StateMachines
Class StateMachine

java.lang.Object
  |
  +--UML.Semantic.Foundation.Core.ModelElement
        |
        +--UML.Semantic.BehavioralElements.StateMachines.StateMachine
All Implemented Interfaces:
Element, ElementAtt, LinkAtt
Direct Known Subclasses:
ActivityModel

public class StateMachine
extends ModelElement

A state machine is a behavior that specifies the sequences of states that an object or an interaction goes through during its life in response to events, together with its responses and actions. The behavior is specified as a traversal of a graph of state nodes interconnected by one or more joined transition arcs. The transitions are triggered by series of event instances.

In the metamodel a StateMachine is composed of States and Transitions. The ModelElement role provides the context for the StateMachine. A common case of the context relation is where a StateMachine is designated to specify the lifecycle of the Classifier. The StateMachine has a composition aggregation to a State that represents the top state and a set of Transitions. As a consequence the StateMachine owns its Transitions and its top State, but nested states are transitively owned through their parent States.


Constructor Summary
StateMachine()
           
 
Method Summary
 void add(Transition elem)
           
 boolean check()
          Checks if well-formedness rules are respected in this model element.
 State getTop()
           
 java.util.Vector getTransitions()
           
 void setTopState(java.lang.String top)
           
 
Methods inherited from class UML.Semantic.Foundation.Core.ModelElement
add, add, getBindingList, getConstraintList, getElementType, getErrors, getHref, getId, getIdentification, getIdref, getIndex, getInfo, getIsOwned, getLabel, getLocator, getName, getNamespace, getNamespaceId, getStereotype, getTemplate, getTemplateParameterList, getTitle, getUuid, getUuidref, getVisibility, getVisibilitySymbol, getWarnings, setElementType, setErrors, setHref, setId, setIdref, setIndex, setIsOwned, setLabel, setName, setNamespace, setTemplate, setTitle, setUuid, setUuidref, setVisibility, setWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateMachine

public StateMachine()
Method Detail

setTopState

public void setTopState(java.lang.String top)

getTop

public State getTop()

add

public void add(Transition elem)

getTransitions

public java.util.Vector getTransitions()

check

public boolean check()
Checks if well-formedness rules are respected in this model element.

Overrides:
check in class ModelElement
Returns:
True if check was successful, false otherwise.