it.amattioli.workstate.core
Class MetaConcurrentState

Show UML class diagram
java.lang.Object
  extended by it.amattioli.workstate.core.MetaState
      extended by it.amattioli.workstate.core.MetaRealState
          extended by it.amattioli.workstate.core.MetaCompositeState
              extended by it.amattioli.workstate.core.MetaConcurrentState
All Implemented Interfaces:
Receiver

public class MetaConcurrentState
extends MetaCompositeState


Constructor Summary
MetaConcurrentState(String tag, StateAction entry, StateAction exit)
          Construct a new MetaConcurrentState given its identifier (tag) and its entry and exit action.
 
Method Summary
protected  void checkAllowedSubstate(MetaState newMetaState)
          Verifies that a sub-state of this state is a MetaSequentialState.
 State newState(CompositeState parent)
          Create a new State based on this meta-state.
 
Methods inherited from class it.amattioli.workstate.core.MetaCompositeState
addMetaState, getSubstate, getSubstates, isAncestorOf, isSubstate, receive
 
Methods inherited from class it.amattioli.workstate.core.MetaRealState
addAttribute, checkAttribute, equals, getEntryAction, getExitAction, getTag, initialAttributesValues, isAllowedAttribute, toString
 
Methods inherited from class it.amattioli.workstate.core.MetaState
addAvailableEvents, addTransition, checkParentState, descendFrom, findTriggeredTransition, getAvailableEvents, getConfig, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 identifier
entry - this state entry action. Passing null means no action should be performed
exit - this state exit action. Passing null means no action should be performed
Throws:
NullPointerException - if the tag is null
Method Detail

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.