it.amattioli.workstate.core
Class MetaSimpleState
java.lang.Object
it.amattioli.workstate.core.MetaState
it.amattioli.workstate.core.MetaRealState
it.amattioli.workstate.core.MetaSimpleState
- All Implemented Interfaces:
- Receiver
public class MetaSimpleState
- extends MetaRealState
A MetaSimpleState represents the configuration of a simple state, a
state without sub-states.
MetaSimpleState
public MetaSimpleState(String tag,
StateAction entry,
StateAction exit)
- Build a new
MetaSimpleState given its tag and its entry and exit
actions.
- Parameters:
tag - this state tagentry - the state entry action or null if no action must be executed
when the state is enteredexit - the state exit action or null if no action must be executed
when the state is exited
- Throws:
NullPointerException - if the tag is null
newState
public State newState(CompositeState parent)
- Description copied from class:
MetaState
- Create a new
State based on this meta-state. Implementations of
this method must call MetaState.checkParentState(CompositeState) to check
that the passed state is admittable as parent state for the state that
will be created.
- Specified by:
newState in class MetaState
- Parameters:
parent - the parent state for the state that will be created
- Returns:
- the new state
receive
public void receive(Visitor visitor)
Copyright © 2011. All Rights Reserved.