## org.eclipse.uml2.uml
Interface State

All Superinterfaces:
  Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, Namespace, org.eclipse.emf.common.notify.Notifier, RedefinableElement, Vertex

All Known Subinterfaces:
  FinalState

    public interface State

extends Namespace, RedefinableElement, Vertex

A representation of the model object 'State'. A state models a situation during which some (usually implicit) invariant condition holds. The states of protocol state machines are exposed to the users of their context classifiers. A protocol state represents an exposed stable situation of its context classifier: when an instance of the classifier is not processing any operation, users of this instance can always know its state configuration.

The following features are supported:

- `Is Composite`
- `Is Orthogonal`
- `Is Simple`
- `Is Submachine State`
- `Submachine`
- `Connection`
- `Connection Point`
- `Redefined State`
- `State Invariant`
- `Entry`
- `Exit`
- `Do Activity`
- `Deferrable Trigger`
- `Region`

See Also:
  `UMLPackage.getState()`

Field Summary

Fields inherited from interface org.eclipse.uml2.uml.NamedElement
`SEPARATOR`

Fields inherited from interface org.eclipse.uml2.uml.NamedElement
`SEPARATOR`

Fields inherited from interface org.eclipse.uml2.uml.NamedElement
`SEPARATOR`

Method Summary
`ConnectionPointReference` `createConnection(java.lang.String name)` Creates a new `ConnectionPointReference`, with the specified 'Name', and appends it to the 'Connection' containment reference list
`Pseudostate` `createConnectionPoint(java.lang.String name)` Creates a new `Pseudostate`, with the specified 'Name', and appends it to the 'Connection Point' containment reference list
`Trigger` `createDeferrableTrigger(java.lang.String name)` Creates a new `Trigger`, with the specified 'Name', and appends it to the 'Deferrable Trigger' containment reference list
`Behavior` `createDoActivity(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)` Creates a new `Behavior`, with the specified 'Name', and sets the 'Do Activity' containment reference
`Behavior` `createEntry(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)` Creates a new `Behavior`, with the specified 'Name', and sets the 'Entry' containment reference
`Behavior` `createExit(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)` Creates a new `Behavior`, with the specified 'Name', and sets the 'Exit' containment reference
`Region` `createRegion(java.lang.String name)` Creates a new `Region`, with the specified 'Name', and appends it to the 'Region' containment reference list
`Constraint` `createStateInvariant(java.lang.String name)` Creates a new `Constraint`,with the specified 'Name', and sets the 'State Invariant' containment reference
`Constraint` `createStateInvariant(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)` Creates a new `Constraint`, with the specified 'Name', and sets the 'State Invariant' containment reference
`ConnectionPointReference` `getConnection(java.lang.String name)` Retrieves the first `ConnectionPointReference` with the specified 'Name' from the 'Connection' containment reference list
`ConnectionPointReference` `getConnection(java.lang.String name, boolean ignoreCase, boolean createOnDemand)` Retrieves the first `ConnectionPointReference` with the specified 'Name' from the 'Connection' containment reference list
`Pseudostate` `getConnectionPoint(java.lang.String name)` Retrieves the first `Pseudostate` with the specified 'Name' from the 'Connection Point' containment reference list
`Pseudostate` `getConnectionPoint(java.lang.String name, boolean ignoreCase, boolean createOnDemand)` Retrieves the first `Pseudostate` with the specified 'Name' from the 'Connection Point' containment reference list
`org.eclipse.emf.common.util.EList<Pseudostate>` `getConnectionPoints()` Returns the value of the 'Connection Point' containment reference list.
`org.eclipse.emf.common.util.EList<ConnectionPointReference>` `getConnections()` Returns the value of the 'Connection' containment reference list.
`Trigger` `getDeferrableTrigger(java.lang.String name)` Retrieves the first `Trigger` with the specified 'Name' from the 'Deferrable Trigger' containment reference list
`Trigger` `getDeferrableTrigger(java.lang.String name, boolean ignoreCase, boolean createOnDemand)` Retrieves the first `Trigger` with the specified 'Name' from the 'Deferrable Trigger' containment reference list
`org.eclipse.emf.common.util.EList<Trigger>` `getDeferrableTriggers()` Returns the value of the 'Deferrable Trigger' containment reference list.
`Behavior` `getDoActivity()` Returns the value of the 'Do Activity' containment reference
`Behavior` `getEntry()` Returns the value of the 'Entry' containment reference
`Behavior` `getExit()` Returns the value of the 'Exit' containment reference
`State` `getRedefinedState()` Returns the value of the 'Redefined State' reference
`Region` `getRegion(java.lang.String name)` Retrieves the first `Region` with the specified 'Name' from the 'Region' containment reference list
`Region` `getRegion(java.lang.String name, boolean ignoreCase, boolean createOnDemand)` Retrieves the first `Region` with the specified 'Name' from the 'Region' containment reference list
`org.eclipse.emf.common.util.EList<Region>` `getRegions()` Returns the value of the 'Region' containment reference list.
`Constraint` `getStateInvariant()` Returns the value of the 'State Invariant' containment reference
`StateMachine` `getSubmachine()` Returns the value of the 'Submachine' reference.
`boolean` `isComposite()` Returns the value of the 'Is Composite' attribute.
`boolean` `isOrthogonal()` Returns the value of the 'Is Orthogonal' attribute.
`boolean` `isRedefinitionContextValid(State redefined)` The query isRedefinitionContextValid() specifies whether the redefinition contexts of a state are properly related to the redefinition contexts of the specified state to allow this element to redefine the other.
`boolean` `isSimple()` Returns the value of the 'Is Simple' attribute.
`boolean` `isSubmachineState()` Returns the value of the 'Is Submachine State' attribute.
`Classifier` `redefinitionContext()` The redefinition context of a state is the nearest containing statemachine.
`void` `setDoActivity(Behavior value)` Sets the value of the '`Do Activity`' containment reference
`void` `setEntry(Behavior value)` Sets the value of the '`Entry`' containment reference
`void` `setExit(Behavior value)` Sets the value of the '`Exit`' containment reference
`void` `setRedefinedState(State value)` Sets the value of the '`Redefined State`' reference
`void` `setStateInvariant(Constraint value)` Sets the value of the '`State Invariant`' containment reference
`void` `setSubmachine(StateMachine value)` Sets the value of the '`Submachine`' reference
`boolean` `validateCompositeStates(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` Only composite states can have entry or exit pseudostates defined.
`boolean` `validateDestinationsOrSourcesOfTransitions(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` The connection point references used as destinations/sources of transitions associated with a submachine state must be defined as entry/exit points in the submachine state machine.
`boolean` `validateEntryOrExit(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` Only entry or exit pseudostates can serve as connection points.
`boolean` `validateSubmachineOrRegions(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` A state is not allowed to have both a submachine and regions.
`boolean` `validateSubmachineStates(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` Only submachine states can have connection point references.

Methods inherited from interface org.eclipse.uml2.uml.Namespace

`createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable`

Methods inherited from interface org.eclipse.uml2.uml.NamedElement

`allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
`getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid`

Methods inherited from interface org.eclipse.uml2.uml.NamedElement

`allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.Vertex
`containingStateMachine, getContainer, getIncoming, getIncoming, getIncomings, getOutgoing, getOutgoing, getOutgoings, setContainer`

Methods inherited from interface org.eclipse.uml2.uml.NamedElement

`allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Method Detail

### isComposite

    boolean isComposite()

  Returns the value of the 'Is Composite' attribute. The default value is `"false"`. A state with isComposite=true is said to be a composite state. A composite state is a state that contains at least one region.

  Returns:
    the value of the 'Is Composite' attribute.
  See Also:
    `UMLPackage.getState_IsComposite()`

### isOrthogonal

    boolean isOrthogonal()

  Returns the value of the 'Is Orthogonal' attribute. The default value is `"false"`. A state with isOrthogonal=true is said to be an orthogonal composite state. An orthogonal composite state contains two or more regions.

  Returns:
    the value of the 'Is Orthogonal' attribute.
  See Also:
    `UMLPackage.getState_IsOrthogonal()`

### isSimple

    boolean isSimple()

  Returns the value of the 'Is Simple' attribute. The default value is `"true"`. A state with isSimple=true is said to be a simple state. A simple state does not have any regions and it does not refer to any submachine state machine.

  Returns:
    the value of the 'Is Simple' attribute.
  See Also:
    `UMLPackage.getState_IsSimple()`

### isSubmachineState

    boolean isSubmachineState()

  Returns the value of the 'Is Submachine State' attribute. The default value is `"false"`. A state with isSubmachineState=true is said to be a submachine state. Such a state refers to a state machine (submachine).

  Returns:
    the value of the 'Is Submachine State' attribute.
  See Also:
    `UMLPackage.getState_IsSubmachineState()`

### getSubmachine

    StateMachine getSubmachine()

  Returns the value of the 'Submachine' reference. It is bidirectional and its opposite is '`Submachine State`'. The state machine that is to be inserted in place of the (submachine) state.

  Returns:
    the value of the 'Submachine' reference.
  See Also:
    `setSubmachine(StateMachine)`, `UMLPackage.getState_Submachine()`, `StateMachine.getSubmachineStates()`

### setSubmachine

    void setSubmachine(StateMachine value)

  Sets the value of the '`Submachine`' reference.

  Parameters:
    `value` - the new value of the 'Submachine' reference.
  See Also:
    `getSubmachine()`

### getConnections

    org.eclipse.emf.common.util.EList<ConnectionPointReference> getConnections()

  Returns the value of the 'Connection' containment reference list. The list contents are of type `ConnectionPointReference`. It is bidirectional and its opposite is '`State`'. The entry and exit connection points used in conjunction with this (submachine) state, i.e. as targets and sources, respectively, in the region with the submachine state. A connection point reference references the corresponding definition of a connection point pseudostate in the statemachine referenced by the submachinestate.

  Returns:
    the value of the 'Connection' containment reference list.
  See Also:
    `UMLPackage.getState_Connection()`, `ConnectionPointReference.getState()`

### createConnection

    ConnectionPointReference createConnection(java.lang.String name)

  Creates a new `ConnectionPointReference`, with the specified 'Name', and appends it to the 'Connection' containment reference list.

  Parameters:
    `name` - The 'Name' for the new `ConnectionPointReference`, or `null`.
  Returns:
    The new `ConnectionPointReference`.
  See Also:
    `getConnections()`

### getConnection

    ConnectionPointReference getConnection(java.lang.String name)

  Retrieves the first `ConnectionPointReference` with the specified 'Name' from the 'Connection' containment reference list.

  Parameters:
    `name` - The 'Name' of the `ConnectionPointReference` to retrieve, or `null`.
  Returns:
    The first `ConnectionPointReference` with the specified 'Name', or `null`.
  See Also:
    `getConnections()`

### getConnection

    ConnectionPointReference getConnection(java.lang.String name,
                                           boolean ignoreCase,
                                           boolean createOnDemand)

  Retrieves the first `ConnectionPointReference` with the specified 'Name' from the 'Connection' containment reference list.

  Parameters:
    `name` - The 'Name' of the `ConnectionPointReference` to retrieve, or `null`.
    `ignoreCase` - Whether to ignore case in `String` comparisons.
    `createOnDemand` - Whether to create a `ConnectionPointReference` on demand if not found.
  Returns:
    The first `ConnectionPointReference` with the specified 'Name', or `null`.
  See Also:
    `getConnections()`

### getConnectionPoints

    org.eclipse.emf.common.util.EList<Pseudostate> getConnectionPoints()

  Returns the value of the 'Connection Point' containment reference list. The list contents are of type `Pseudostate`. It is bidirectional and its opposite is '`State`'. The entry and exit pseudostates of a composite state. These can only be entry or exit Pseudostates, and they must have different names. They can only be defined for composite states.

  Returns:
    the value of the 'Connection Point' containment reference list.
  See Also:
    `UMLPackage.getState_ConnectionPoint()`, `Pseudostate.getState()`

### createConnectionPoint

    Pseudostate createConnectionPoint(java.lang.String name)

  Creates a new `Pseudostate`, with the specified 'Name', and appends it to the 'Connection Point' containment reference list.

  Parameters:
    `name` - The 'Name' for the new `Pseudostate`, or `null`.
  Returns:
    The new `Pseudostate`.
  See Also:
    `getConnectionPoints()`

### getConnectionPoint

    Pseudostate getConnectionPoint(java.lang.String name)

  Retrieves the first `Pseudostate` with the specified 'Name' from the 'Connection Point' containment reference list.

  Parameters:
    `name` - The 'Name' of the `Pseudostate` to retrieve, or `null`.
  Returns:
    The first `Pseudostate` with the specified 'Name', or `null`.
  See Also:
    `getConnectionPoints()`

### getConnectionPoint

    Pseudostate getConnectionPoint(java.lang.String name,
                                   boolean ignoreCase,
                                   boolean createOnDemand)

  Retrieves the first `Pseudostate` with the specified 'Name' from the 'Connection Point' containment reference list.

  Parameters:
    `name` - The 'Name' of the `Pseudostate` to retrieve, or `null`.
    `ignoreCase` - Whether to ignore case in `String` comparisons.
    `createOnDemand` - Whether to create a `Pseudostate` on demand if not found.
  Returns:
    The first `Pseudostate` with the specified 'Name', or `null`.
  See Also:
    `getConnectionPoints()`

### getRedefinedState

    State getRedefinedState()

  Returns the value of the 'Redefined State' reference. The state of which this state is a redefinition.

  Returns:
    the value of the 'Redefined State' reference.
  See Also:
    `setRedefinedState(State)`, `UMLPackage.getState_RedefinedState()`

### setRedefinedState

    void setRedefinedState(State value)

  Sets the value of the '`Redefined State`' reference.

  Parameters:
    `value` - the new value of the 'Redefined State' reference.
  See Also:
    `getRedefinedState()`

### getStateInvariant

    Constraint getStateInvariant()

  Returns the value of the 'State Invariant' containment reference. Specifies conditions that are always true when this state is the current state. In protocol state machines, state invariants are additional conditions to the preconditions of the outgoing transitions, and to the postcondition of the incoming transitions.

  Returns:
    the value of the 'State Invariant' containment reference.
  See Also:
    `setStateInvariant(Constraint)`, `UMLPackage.getState_StateInvariant()`

### setStateInvariant

    void setStateInvariant(Constraint value)

  Sets the value of the '`State Invariant`' containment reference.

  Parameters:
    `value` - the new value of the 'State Invariant' containment reference.
  See Also:
    `getStateInvariant()`

### createStateInvariant

    Constraint createStateInvariant(java.lang.String name,
                                    org.eclipse.emf.ecore.EClass eClass)

  Creates a new `Constraint`, with the specified 'Name', and sets the 'State Invariant' containment reference.

  Parameters:
    `name` - The 'Name' for the new `Constraint`, or `null`.
    `eClass` - The Ecore class of the `Constraint` to create.
  Returns:
    The new `Constraint`.
  See Also:
    `getStateInvariant()`

### createStateInvariant

    Constraint createStateInvariant(java.lang.String name)

  Creates a new `Constraint`,with the specified 'Name', and sets the 'State Invariant' containment reference.

  Parameters:
    `name` - The 'Name' for the new `Constraint`, or `null`.
  Returns:
    The new `Constraint`.
  See Also:
    `getStateInvariant()`

### getEntry

    Behavior getEntry()

  Returns the value of the 'Entry' containment reference. An optional behavior that is executed whenever this state is entered regardless of the transition taken to reach the state. If defined, entry actions are always executed to completion prior to any internal behavior or transitions performed within the state.

  Returns:
    the value of the 'Entry' containment reference.
  See Also:
    `setEntry(Behavior)`, `UMLPackage.getState_Entry()`

### setEntry

    void setEntry(Behavior value)

  Sets the value of the '`Entry`' containment reference.

  Parameters:
    `value` - the new value of the 'Entry' containment reference.
  See Also:
    `getEntry()`

### createEntry

    Behavior createEntry(java.lang.String name,
                         org.eclipse.emf.ecore.EClass eClass)

  Creates a new `Behavior`, with the specified 'Name', and sets the 'Entry' containment reference.

  Parameters:
    `name` - The 'Name' for the new `Behavior`, or `null`.
    `eClass` - The Ecore class of the `Behavior` to create.
  Returns:
    The new `Behavior`.
  See Also:
    `getEntry()`

### getExit

    Behavior getExit()

  Returns the value of the 'Exit' containment reference. An optional behavior that is executed whenever this state is exited regardless of which transition was taken out of the state. If defined, exit actions are always executed to completion only after all internal activities and transition actions have completed execution.

  Returns:
    the value of the 'Exit' containment reference.
  See Also:
    `setExit(Behavior)`, `UMLPackage.getState_Exit()`

### setExit

    void setExit(Behavior value)

  Sets the value of the '`Exit`' containment reference.

  Parameters:
    `value` - the new value of the 'Exit' containment reference.
  See Also:
    `getExit()`

### createExit

    Behavior createExit(java.lang.String name,
                        org.eclipse.emf.ecore.EClass eClass)

  Creates a new `Behavior`, with the specified 'Name', and sets the 'Exit' containment reference.

  Parameters:
    `name` - The 'Name' for the new `Behavior`, or `null`.
    `eClass` - The Ecore class of the `Behavior` to create.
  Returns:
    The new `Behavior`.
  See Also:
    `getExit()`

### getDoActivity

    Behavior getDoActivity()

  Returns the value of the 'Do Activity' containment reference. An optional behavior that is executed while being in the state. The execution starts when this state is entered, and stops either by itself, or when the state is exited, whichever comes first.

  Returns:
    the value of the 'Do Activity' containment reference.
  See Also:
    `setDoActivity(Behavior)`, `UMLPackage.getState_DoActivity()`

### setDoActivity

    void setDoActivity(Behavior value)

  Sets the value of the '`Do Activity`' containment reference.

  Parameters:
    `value` - the new value of the 'Do Activity' containment reference.
  See Also:
    `getDoActivity()`

### createDoActivity

    Behavior createDoActivity(java.lang.String name,
                              org.eclipse.emf.ecore.EClass eClass)

  Creates a new `Behavior`, with the specified 'Name', and sets the 'Do Activity' containment reference.

  Parameters:
    `name` - The 'Name' for the new `Behavior`, or `null`.
    `eClass` - The Ecore class of the `Behavior` to create.
  Returns:
    The new `Behavior`.
  See Also:
    `getDoActivity()`

### getDeferrableTriggers

    org.eclipse.emf.common.util.EList<Trigger> getDeferrableTriggers()

  Returns the value of the 'Deferrable Trigger' containment reference list. The list contents are of type `Trigger`. A list of triggers that are candidates to be retained by the state machine if they trigger no transitions out of the state (not consumed). A deferred trigger is retained until the state machine reaches a state configuration where it is no longer deferred.

  Returns:
    the value of the 'Deferrable Trigger' containment reference list.
  See Also:
    `UMLPackage.getState_DeferrableTrigger()`

### createDeferrableTrigger

    Trigger createDeferrableTrigger(java.lang.String name)

  Creates a new `Trigger`, with the specified 'Name', and appends it to the 'Deferrable Trigger' containment reference list.

  Parameters:
    `name` - The 'Name' for the new `Trigger`, or `null`.
  Returns:
    The new `Trigger`.
  See Also:
    `getDeferrableTriggers()`

### getDeferrableTrigger

    Trigger getDeferrableTrigger(java.lang.String name)

  Retrieves the first `Trigger` with the specified 'Name' from the 'Deferrable Trigger' containment reference list.

  Parameters:
    `name` - The 'Name' of the `Trigger` to retrieve, or `null`.
  Returns:
    The first `Trigger` with the specified 'Name', or `null`.
  See Also:
    `getDeferrableTriggers()`

### getDeferrableTrigger

    Trigger getDeferrableTrigger(java.lang.String name,
                                 boolean ignoreCase,
                                 boolean createOnDemand)

  Retrieves the first `Trigger` with the specified 'Name' from the 'Deferrable Trigger' containment reference list.

  Parameters:
    `name` - The 'Name' of the `Trigger` to retrieve, or `null`.
    `ignoreCase` - Whether to ignore case in `String` comparisons.
    `createOnDemand` - Whether to create a `Trigger` on demand if not found.
  Returns:
    The first `Trigger` with the specified 'Name', or `null`.
  See Also:
    `getDeferrableTriggers()`

### getRegions

    org.eclipse.emf.common.util.EList<Region> getRegions()

  Returns the value of the 'Region' containment reference list. The list contents are of type `Region`. It is bidirectional and its opposite is '`State`'. The regions owned directly by the state.

  Returns:
    the value of the 'Region' containment reference list.
  See Also:
    `UMLPackage.getState_Region()`, `Region.getState()`

### createRegion

    Region createRegion(java.lang.String name)

  Creates a new `Region`, with the specified 'Name', and appends it to the 'Region' containment reference list.

  Parameters:
    `name` - The 'Name' for the new `Region`, or `null`.
  Returns:
    The new `Region`.
  See Also:
    `getRegions()`

### getRegion

    Region getRegion(java.lang.String name)

  Retrieves the first `Region` with the specified 'Name' from the 'Region' containment reference list.

  Parameters:
    `name` - The 'Name' of the `Region` to retrieve, or `null`.
  Returns:
    The first `Region` with the specified 'Name', or `null`.
  See Also:
    `getRegions()`

### getRegion

    Region getRegion(java.lang.String name,
                     boolean ignoreCase,
                     boolean createOnDemand)

  Retrieves the first `Region` with the specified 'Name' from the 'Region' containment reference list.

  Parameters:
    `name` - The 'Name' of the `Region` to retrieve, or `null`.
    `ignoreCase` - Whether to ignore case in `String` comparisons.
    `createOnDemand` - Whether to create a `Region` on demand if not found.
  Returns:
    The first `Region` with the specified 'Name', or `null`.
  See Also:
    `getRegions()`

### validateSubmachineStates

    boolean validateSubmachineStates(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)

  Only submachine states can have connection point references. isSubmachineState implies connection->notEmpty ( )

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateDestinationsOrSourcesOfTransitions

    boolean validateDestinationsOrSourcesOfTransitions(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                       java.util.Map<java.lang.Object,java.lang.Object> context)

  The connection point references used as destinations/sources of transitions associated with a submachine state must be defined as entry/exit points in the submachine state machine. self.isSubmachineState implies (self.connection->forAll (cp | cp.entry->forAll (p | p.statemachine = self.submachine) and cp.exit->forAll (p | p.statemachine = self.submachine)))

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateSubmachineOrRegions

    boolean validateSubmachineOrRegions(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)

  A state is not allowed to have both a submachine and regions. isComposite implies not isSubmachineState

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateCompositeStates

    boolean validateCompositeStates(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)

  Only composite states can have entry or exit pseudostates defined. connectionPoint->notEmpty() implies isComoposite

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateEntryOrExit

    boolean validateEntryOrExit(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)

  Only entry or exit pseudostates can serve as connection points. connectionPoint->forAll(cp|cp.kind = #entry or cp.kind = #exit)

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### redefinitionContext

    Classifier redefinitionContext()

  The redefinition context of a state is the nearest containing statemachine. result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif

### isRedefinitionContextValid

    boolean isRedefinitionContextValid(State redefined)

  The query isRedefinitionContextValid() specifies whether the redefinition contexts of a state are properly related to the redefinition contexts of the specified state to allow this element to redefine the other. The containing region of a redefining state must redefine the containing region of the redefined state. result = true

Copyright 2003, 2007 IBM Corporation and others. All Rights Reserved.