it.amattioli.workstate.core
Class MetaConcurrentState
java.lang.Object
it.amattioli.workstate.core.MetaState
it.amattioli.workstate.core.MetaRealState
it.amattioli.workstate.core.MetaCompositeState
it.amattioli.workstate.core.MetaConcurrentState
- All Implemented Interfaces:
- Receiver
public class MetaConcurrentState
- extends MetaCompositeState
MetaConcurrentState
public MetaConcurrentState(String tag,
StateAction entry,
StateAction exit)
- Construct a new MetaConcurrentState given its identifier (tag) and its
entry and exit action.
- Parameters:
tag - this state identifierentry - this state entry action. Passing null means no action should
be performedexit - this state exit action. Passing null means no action should be
performed
- Throws:
NullPointerException - if the tag is null
checkAllowedSubstate
protected void checkAllowedSubstate(MetaState newMetaState)
- Verifies that a sub-state of this state is a
MetaSequentialState.
- Overrides:
checkAllowedSubstate in class MetaCompositeState
- Parameters:
newMetaState - the MetaState that shoud be checked
- Throws:
IllegalArgumentException - if the parameter cannot be a sub-state of
this state
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
Copyright © 2011. All Rights Reserved.