it.amattioli.workstate.core
Class MetaSimpleState

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.MetaSimpleState
All Implemented Interfaces:
Receiver

public class MetaSimpleState
extends MetaRealState

A MetaSimpleState represents the configuration of a simple state, a state without sub-states.


Constructor Summary
MetaSimpleState(String tag, StateAction entry, StateAction exit)
          Build a new MetaSimpleState given its tag and its entry and exit actions.
 
Method Summary
 State newState(CompositeState parent)
          Create a new State based on this meta-state.
 void receive(Visitor visitor)
           
 
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

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 tag
entry - the state entry action or null if no action must be executed when the state is entered
exit - the state exit action or null if no action must be executed when the state is exited
Throws:
NullPointerException - if the tag is null
Method Detail

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.