public class StateMachine extends Object implements DescriptionObject
| Modifier and Type | Field and Description |
|---|---|
ItemPath |
itemPath |
String |
name |
Integer |
version |
| Constructor and Description |
|---|
StateMachine() |
StateMachine(String name,
Integer version) |
public String name
public Integer version
public ItemPath itemPath
public State createState(String name)
name - the name of the Statepublic Transition createTransition(String name)
name - the name of the Transitionpublic void setTransitions(ArrayList<Transition> newTransitions)
public boolean validate()
public ArrayList<Transition> getTransitions()
public State getInitialState()
public void setInitialState(State initialState)
public int getInitialStateCode()
public void setInitialStateCode(int initialStateCode)
public String getName()
getName in interface DescriptionObjectpublic Integer getVersion()
getVersion in interface DescriptionObjectpublic void setName(String name)
setName in interface DescriptionObjectpublic void setVersion(Integer version)
setVersion in interface DescriptionObjectpublic ItemPath getItemPath()
getItemPath in interface DescriptionObjectpublic void setItemPath(ItemPath path)
setItemPath in interface DescriptionObjectpublic String getItemID()
getItemID in interface DescriptionObjectpublic Transition getTransition(int transitionID)
public Transition getTransition(String name)
public int getTransitionID(String name)
name - the name of the Transitionpublic int getValidTransitionID(String transName) throws InvalidDataException
transName - the name of the TransactionInvalidDataException - the name was not foundpublic State getState(int stateID)
public CollectionArrayList makeDescCollections(TransactionKey transactionKey)
makeDescCollections in interface DescriptionObjectpublic Map<Transition,String> getPossibleTransitions(Activity act, AgentPath agent) throws ObjectNotFoundException, InvalidDataException
public State traverse(Activity act, Transition transition, AgentPath agent) throws InvalidTransitionException, AccessRightsException, ObjectNotFoundException, InvalidDataException
public boolean isCoherent()
public int getErrorTransitionIdForState(int id)
public void export(Writer imports, File dir, boolean shallow) throws IOException, InvalidDataException
export in interface DescriptionObjectIOExceptionInvalidDataExceptionCopyright © 1997–2022 CRISTAL-iSE. All rights reserved.