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

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  Final

public class State
extends TransitionTarget

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

See Also:
  Serialized Form

Constructor Summary
`State()` Constructor.

Method Summary
`void` | `addChild(State state)` Deprecated. Use `addChild(TransitionTarget)` instead.
`void` | `addChild(TransitionTarget tt)` Add a child transition target.
`Map` | `getChildren()` Get the map of child states (may be empty).
`String` | `getFirst()` Get the initial state's ID.
`Initial` | `getInitial()` Get the initial state.
`Invoke` | `getInvoke()` Get the Invoke child (may be null).
`boolean` | `getIsFinal()` Deprecated. Use `isFinal()` instead
`Parallel` | `getParallel()` Deprecated. <parallel> no longer needs an enclosing <state> element.
`boolean` | `isComposite()` Check whether this is a composite state (UML terminology).
`boolean` | `isDone()` Deprecated. Will be removed in v1.0, in favor of `SCInstance#isDone(TransitionTarget)`
`boolean` | `isFinal()` Is this state a "final" state.
`boolean` | `isOrthogonal()` Deprecated. <parallel> now represents an orthogonal state, rather than denoting that the enclosing state is orthogonal, as it did in previous SCXML WDs.
`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)` Deprecated. Will be removed in v1.0, in favor of `SCInstance#setDone(TransitionTarget)`
`void` | `setFinal(boolean isFinal)` Set whether this is a "final" state.
`void` | `setFirst(String target)` Set the initial state by its ID string.
`void` | `setInitial(Initial target)` Set the initial state.
`void` | `setInvoke(Invoke invoke)` Set the Invoke child.
`void` | `setIsFinal(boolean isFinal)` Deprecated. Use `setFinal(boolean)` instead
`void` | `setParallel(Parallel parallel)` Deprecated. <parallel> no longer needs an enclosing <state> element.

Methods inherited from class org.apache.commons.scxml.model.TransitionTarget
`addHistory, addTransition, getDatamodel, getHistory, getId, getOnEntry, getOnExit, getParent, getParentState, getTransitions, getTransitionsList, getTransitionsList, hasHistory, 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()

  Deprecated. Use `isFinal()` instead

  Is this state a "final" state.

  Returns:
    boolean Returns the isFinal.

### setIsFinal

    public final void setIsFinal(boolean isFinal)

  Deprecated. Use `setFinal(boolean)` instead

  Set whether this is a "final" state.

  Parameters:
    `isFinal` - The isFinal to set.

### isFinal

    public final boolean isFinal()

  Is this state a "final" state.

  Returns:
    boolean Returns the isFinal.
  Since:
    0.7

### setFinal

    public final void setFinal(boolean isFinal)

  Set whether this is a "final" state.

  Parameters:
    `isFinal` - The isFinal to set.
  Since:
    0.7

### getParallel

    public final Parallel getParallel()

  Deprecated. <parallel> no longer needs an enclosing <state> element.

  Get the Parallel child (may be null).

  Returns:
    Parallel Returns the parallel.

### setParallel

    public final void setParallel(Parallel parallel)

  Deprecated. <parallel> no longer needs an enclosing <state> element.

  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.

### getFirst

    public final String getFirst()

  Get the initial state's ID.

  Returns:
    The initial state's string ID.

### setFirst

    public final void setFirst(String target)

  Set the initial state by its ID string.

  Parameters:
    `target` - The initial target's ID 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)

  Deprecated. Use `addChild(TransitionTarget)` instead.

  Add a child state.

  Parameters:
    `state` - a child state

### addChild

    public final void addChild(TransitionTarget tt)

  Add a child transition target.

  Parameters:
    `tt` - a child transition target
  Since:
    0.7

### 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()

  Deprecated. <parallel> now represents an orthogonal state, rather than denoting that the enclosing state is orthogonal, as it did in previous SCXML WDs.

  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()

  Deprecated. Will be removed in v1.0, in favor of `SCInstance#isDone(TransitionTarget)`

  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)

  Deprecated. Will be removed in v1.0, in favor of `SCInstance#setDone(TransitionTarget)`

  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-2008 The Apache Software Foundation. All Rights Reserved.