com.werken.blissed
Class State

java.lang.Object
  |
  +--com.werken.blissed.State
All Implemented Interfaces:
Described, Named, org.apache.commons.graph.Vertex

public class State
extends java.lang.Object
implements Named, Described, org.apache.commons.graph.Vertex

A Activity-bearing state in the process graph.

A State contains a Activity and a sequence of one-or-more Transitions denoting guarded exit paths.

Author:
bob mcwhirter
See Also:
Activity, Transition

Method Summary
 Transition addTransition(State destination, Guard guard, java.lang.String description)
          Create a transition.
 Transition addTransition(State destination, java.lang.String description)
          Create a transition.
 Activity getActivity()
          Retrieve the Activity for this state.
 java.lang.String getDescription()
          Retrieve the description of this state.
 java.lang.String getName()
          Retrieve the name of this state.
 java.util.List getTransitions()
          Retrieve the live list of outbound.
 void removeTransition(Transition transition)
          Remove an exit path transition.
 void setActivity(Activity activity)
          Set the Activity for this state.
 void setDescription(java.lang.String description)
          Set the description
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

removeTransition

public void removeTransition(Transition transition)
Remove an exit path transition.
Parameters:
transition - The transition to remove.

addTransition

public Transition addTransition(State destination,
                                java.lang.String description)
Create a transition.
Parameters:
destination - The destination of the transition.
description - Description of the transition.
Returns:
The added transition.

addTransition

public Transition addTransition(State destination,
                                Guard guard,
                                java.lang.String description)
Create a transition.
Parameters:
destination - The destination of the transition.
guard - Guard of the transition.
description - Description of the transition.
Returns:
The added transition.

getTransitions

public java.util.List getTransitions()
Retrieve the live list of outbound.

The live list that is returned is backed directly by the State. Changes made to the list are reflected internally within the State.

Returns:
The List of Transitions.

setActivity

public void setActivity(Activity activity)
Set the Activity for this state.
Parameters:
activity - The activity.

getActivity

public Activity getActivity()
Retrieve the Activity for this state.
Returns:
The activity.

getName

public java.lang.String getName()
Retrieve the name of this state.
Specified by:
getName in interface Named
Returns:
The name.

getDescription

public java.lang.String getDescription()
Retrieve the description of this state.
Specified by:
getDescription in interface Described
Returns:
The description.

setDescription

public void setDescription(java.lang.String description)
Set the description
Specified by:
setDescription in interface Described
Parameters:
description - The description.


Copyright © 2002-2002 The Werken Company. All Rights Reserved.