站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

State (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.state
Class State

java.lang.Object
  extended byorg.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()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.