com.tomgibara.pronto.state.impl
Class StateFactoryImpl

java.lang.Object
  extended by com.tomgibara.pronto.state.StateFactory
      extended by com.tomgibara.pronto.state.impl.StateFactoryImpl

public class StateFactoryImpl
extends StateFactory


Constructor Summary
StateFactoryImpl()
           
 
Method Summary
<S,L> StateGraph<S,L>
emptyStateGraph()
          Creates an empty state graph from which an editor is typically obtained to build any required state graph.
<S,L,P> StateEngine<S,L,P>
newEngine(StateGraph<S,L> graph, StateActivator<S,L,P> activator)
          Combines a graph and activator to form a new engine.
 
Methods inherited from class com.tomgibara.pronto.state.StateFactory
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateFactoryImpl

public StateFactoryImpl()
Method Detail

emptyStateGraph

public <S,L> StateGraph<S,L> emptyStateGraph()
Description copied from class: StateFactory
Creates an empty state graph from which an editor is typically obtained to build any required state graph.

Specified by:
emptyStateGraph in class StateFactory
Type Parameters:
S - the type of states the state graph editor will permit
L - the type of labels the state graph editor will permit
Returns:
a state graph containing no states

newEngine

public <S,L,P> StateEngine<S,L,P> newEngine(StateGraph<S,L> graph,
                                            StateActivator<S,L,P> activator)
Description copied from class: StateFactory
Combines a graph and activator to form a new engine.

Specified by:
newEngine in class StateFactory
Type Parameters:
S - the type of states in the graph
L - the type of labels in the graph
P - the type of parameters accepted by the activator
Parameters:
graph - the graph of states and transitions permitted by the engine
activator - an object that can 'act' in response to state changes
Returns:
a new engine which can transition over the graph of states subject to execution of the activator


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