
| Constructor and Description |
|---|
MachineState(E initialState)
Initialize with an initialState but no association (Machine State is
empty)
|
MachineState(E initialState,
ConcurrentMap<E,EnumSet<E>> map)
Initialize with an initialState
|
| Modifier and Type | Method and Description |
|---|---|
EnumSet<E> |
addNewAssociation(E state,
EnumSet<E> set)
Add a new association from one state to a set of acceptable following
states (can replace an existing
association)
|
EnumSet<E> |
addNewAssociation(Transition<E> elt)
Add a new association from one state to a set of acceptable following
states (can replace an existing
association)
|
E |
getCurrent()
Return the current application state.
|
void |
release()
Release the Machine State
|
EnumSet<E> |
removeAssociation(E state)
Remove an association from one state to any acceptable following states
|
E |
setCurrent(E desiredState)
Sets the current application state.
|
E |
setDryCurrent(E desiredState)
Sets the current application state, but no exception if not compatible.
|
public MachineState(E initialState, ConcurrentMap<E,EnumSet<E>> map)
initialState - initial MachineStatemap - the association of state and set of acceptable
following
statespublic MachineState(E initialState)
initialState - initial MachineStatepublic final EnumSet<E> addNewAssociation(E state, EnumSet<E> set)
state - set - the new associationpublic final EnumSet<E> addNewAssociation(Transition<E> elt)
elt - public final EnumSet<E> removeAssociation(E state)
state - the state to remove any acceptable following statespublic final E getCurrent()
public final E setCurrent(E desiredState) throws IllegalFiniteStateException
desiredState - IllegalFiniteStateException - if the state is not allowedpublic final E setDryCurrent(E desiredState)
desiredState - public final void release()
Copyright © 2009–2022 Waarp. All rights reserved.