com.tomgibara.pronto.state
Interface StateTransition<S,L>

Type Parameters:
S - the type of states the transition is between
L - the type of label this transition carries.
All Known Implementing Classes:
StateTransitionImpl

public interface StateTransition<S,L>

State transitions are aggregated into graphs by StateGraph objects. Note that the states and labels for transitions are never permitted to be null. If labels are not required, a singleton class instance can be used (ie. a simplified null object pattern) to provide the same label for all transitions in a graph.

Author:
Tom Gibara

Method Summary
 L getLabel()
          The label with which the transition is decorated.
 S getSource()
          The state away from which the transition is directed.
 S getTarget()
          The state towards which the transition is directed.
 

Method Detail

getSource

S getSource()
The state away from which the transition is directed.

Returns:
the source of the transition, never null

getLabel

L getLabel()
The label with which the transition is decorated.

Returns:
the label of the transition, never null

getTarget

S getTarget()
The state towards which the transition is directed.

Returns:
the target of the transition, never null


Copyright © 2006-2007 Tom Gibara. All Rights Reserved.