Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.scxml.model
Class State

    java.lang.Object
      org.apache.commons.scxml.model.TransitionTarget
          org.apache.commons.scxml.model.State

public class State
extends TransitionTarget

The class in this SCXML object model that corresponds to the <state> SCXML element.

Constructor Summary
`State()` Constructor.

Method Summary
`void` | `addChild(State state)` Add a child state.
`void` | `addHistory(History h)` This method is used by XML digester.
`void` | `addTransition(Transition transition)` Add a transition to the map of all outgoing transitions for this state.
`Map` | `getChildren()` Get the map of child states (may be empty).
`List` | `getHistory()` Get the list of history pseudo states for this state.
`Initial` | `getInitial()` Get the initial state.
`Invoke` | `getInvoke()` Get the Invoke child (may be null).
`boolean` | `getIsFinal()` Is this state a "final" state.
`Parallel` | `getParallel()` Get the Parallel child (may be null).
`Map` | `getTransitions()` Get the map of all outgoing transitions from this state.
`List` | `getTransitionsList()` Get the outgoing transitions for this state as a java.util.List.
`List` | `getTransitionsList(String event)` Get the list of all outgoing transitions from this state, that will be candidates for being fired on the given event.
`boolean` | `hasHistory()` Does this state have a history pseudo state.
`boolean` | `isComposite()` Check whether this is a composite state (UML terminology).
`boolean` | `isDone()` In case this is a parallel state, check if one its final states is active.
`boolean` | `isOrthogonal()` Checks whether it is a orthogonal state, that is, it owns a parallel (UML terminology).
`boolean` | `isRegion()` Checks whether it is a region state (directly nested to parallel - UML terminology).
`boolean` | `isSimple()` Check whether this is a simple (leaf) state (UML terminology).
`void` | `setDone(boolean done)` Update the done property, which is set if this is a parallel state, and one its final states is active.
`void` | `setInitial(Initial target)` Set the initial state.
`void` | `setInvoke(Invoke invoke)` Set the Invoke child.
`void` | `setIsFinal(boolean isFinal)` Set whether this is a "final" state.
`void` | `setParallel(Parallel parallel)` Set the Parallel child.

Methods inherited from class org.apache.commons.scxml.model.TransitionTarget
`getDatamodel, getId, getOnEntry, getOnExit, getParent, getParentState, setDatamodel, setId, setOnEntry, setOnExit, setParent`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### State

    public State()

  Constructor.

Method Detail

### getIsFinal

    public final boolean getIsFinal()

  Is this state a "final" state.

  Returns:
    boolean Returns the isFinal.

### setIsFinal

    public final void setIsFinal(boolean isFinal)

  Set whether this is a "final" state.

  Parameters:
    `isFinal` - The isFinal to set.

### getParallel

    public final Parallel getParallel()

  Get the Parallel child (may be null).

  Returns:
    Parallel Returns the parallel.

### setParallel

    public final void setParallel(Parallel parallel)

  Set the Parallel child.

  Parameters:
    `parallel` - The parallel to set.

### getInvoke

    public final Invoke getInvoke()

  Get the Invoke child (may be null).

  Returns:
    Invoke Returns the invoke.

### setInvoke

    public final void setInvoke(Invoke invoke)

  Set the Invoke child.

  Parameters:
    `invoke` - The invoke to set.

### getInitial

    public final Initial getInitial()

  Get the initial state.

  Returns:
    Initial Returns the initial state.

### setInitial

    public final void setInitial(Initial target)

  Set the initial state.

  Parameters:
    `target` - The target to set.

### getTransitions

    public final Map getTransitions()

  Get the map of all outgoing transitions from this state.

  Returns:
    Map Returns the transitions Map.

### getTransitionsList

    public final List getTransitionsList(String event)

  Get the list of all outgoing transitions from this state, that will be candidates for being fired on the given event.

  Parameters:
    `event` - The event
  Returns:
    List Returns the candidate transitions for given event

### addTransition

    public final void addTransition(Transition transition)

  Add a transition to the map of all outgoing transitions for this state.

  Parameters:
    `transition` - The transitions to set.

### getChildren

    public final Map getChildren()

  Get the map of child states (may be empty).

  Returns:
    Map Returns the children.

### addChild

    public final void addChild(State state)

  Add a child state.

  Parameters:
    `state` - a child state

### getTransitionsList

    public final List getTransitionsList()

  Get the outgoing transitions for this state as a java.util.List.

  Returns:
    List Returns the transitions (as a list). TODO - Check in next iteration whether both methods need to be retained.

### addHistory

    public final void addHistory(History h)

  This method is used by XML digester.

  Parameters:
    `h` - History pseudo state

### hasHistory

    public final boolean hasHistory()

  Does this state have a history pseudo state.

  Returns:
    boolean true if a given state contains at least one history pseudo state

### getHistory

    public final List getHistory()

  Get the list of history pseudo states for this state.

  Returns:
    a list of all history pseudo states contained by a given state (can be empty)
  See Also:
    `hasHistory()`

### isSimple

    public final boolean isSimple()

  Check whether this is a simple (leaf) state (UML terminology).

  Returns:
    true if this is a simple state, otherwise false

### isComposite

    public final boolean isComposite()

  Check whether this is a composite state (UML terminology).

  Returns:
    true if this is a composite state, otherwise false

### isRegion

    public final boolean isRegion()

  Checks whether it is a region state (directly nested to parallel - UML terminology).

  Returns:
    true if this is a region state, otherwise false
  See Also:
    `Parallel`

### isOrthogonal

    public final boolean isOrthogonal()

  Checks whether it is a orthogonal state, that is, it owns a parallel (UML terminology).

  Returns:
    true if this is a orthogonal state, otherwise false

### isDone

    public final boolean isDone()

  In case this is a parallel state, check if one its final states is active.

  Returns:
    Returns the done.

### setDone

    public final void setDone(boolean done)

  Update the done property, which is set if this is a parallel state, and one its final states is active.

  Parameters:
    `done` - The done to set.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2006 The Apache Software Foundation. All Rights Reserved.