Package repast.simphony.statecharts
Interface StateChart<T>
- All Known Implementing Classes:
DefaultStateChart
public interface StateChart<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivateState(String stateID) Activates the state (identified by a potentially non-unique ID) if it exists.voidactivateState(AbstractState<T> state) Activates the state if it exists.voidbegin(StateChartSimIntegrator integrator) Begin state chart.voidfollowTransition(String transitionID) Follow the transition (identified by a potentially non-unique ID) if valid.voidfollowTransition(Transition<T> transition) Follow the transition if valid.getAgent()Gets the agent associated with this StateChart.Retrieve current state.doublegetStateForUuid(String uuid) Returns the state associated with the uuid or null if not found.getTransitionForUuid(String uuid) Returns the transition associated with the uuid or null if not found.getUuidForState(AbstractState<T> state) voidreceiveMessage(Object message) Receive a message into the statechart queue.voidvoidvoidresolve()voidstop()Stops the state chart.booleanwithinState(String id)
-
Method Details
-
receiveMessage
Receive a message into the statechart queue. -
getAgent
T getAgent()Gets the agent associated with this StateChart.- Returns:
- the agent associated with this StateChart.
-
begin
Begin state chart. -
stop
void stop()Stops the state chart. -
getCurrentSimpleState
AbstractState<T> getCurrentSimpleState()Retrieve current state.- Returns:
-
withinState
-
getCurrentStates
List<AbstractState<T>> getCurrentStates() -
getUuidForState
-
getStateForUuid
Returns the state associated with the uuid or null if not found.- Parameters:
uuid-- Returns:
-
registerStateChartListener
-
removeStateChartListener
-
getTransitionForUuid
Returns the transition associated with the uuid or null if not found.- Parameters:
uuid-- Returns:
-
activateState
Activates the state if it exists. Should be called when simulation is paused.- Parameters:
state- the state to activate
-
followTransition
Follow the transition if valid. Should be called when simulation is paused.- Parameters:
transition- the transition to follow
-
activateState
Activates the state (identified by a potentially non-unique ID) if it exists.- Parameters:
stateID- the potentially non-unique ID of the state to activate
-
followTransition
Follow the transition (identified by a potentially non-unique ID) if valid.- Parameters:
transitionID- the potentially non-unique ID of the transition to follow
-
getPriority
double getPriority() -
resolve
void resolve()
-