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.jboss.util.state
Class State

    java.lang.Object
      org.jboss.util.state.State

public class State
extends Object

The respresentation of a state in a state machine.

Version:
  $Revision: 1.5 $
Author:
  Scott.Stark@jboss.org

Constructor Summary
`State(String name)`
`State(String name, Map transitions)`

Method Summary
`void` | `addTransition(Transition transition)` Add a transition to the allowed transition map.
`Object` | `getData()`
`String` | `getName()` Get the state name.
`Transition` | `getTransition(String name)` Lookup an allowed transition given its name.
`Map` | `getTransitions()` Get the Map of allowed transitions for this state.
`boolean` | `isAcceptState()` An accept state is indicated by no transitions
`void` | `setData(Object data)`
`String` | `toString()`

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

Constructor Detail

### State

    public State(String name)

### State

    public State(String name,
                 Map transitions)

Method Detail

### getName

    public String getName()

  Get the state name.

  Returns:
    the name of the state.

### getData

    public Object getData()

### setData

    public void setData(Object data)

### isAcceptState

    public boolean isAcceptState()

  An accept state is indicated by no transitions

  Returns:
    true if this is an accept state, false otherwise.

### addTransition

    public void addTransition(Transition transition)

  Add a transition to the allowed transition map.

  Parameters:
    `transition` -

### getTransition

    public Transition getTransition(String name)

  Lookup an allowed transition given its name.

  Parameters:
    `name` - - the name of a valid transition from this state.
  Returns:
    the valid transition if it exists, null otherwise.

### getTransitions

    public Map getTransitions()

  Get the Map of allowed transitions for this state.

  Returns:
    the allowed transitions map.

### toString

    public String toString()

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 © 2002 JBoss Group, LLC. All Rights Reserved.