Package repast.simphony.statecharts
Interface StateChart<T>
- All Known Implementing Classes:
DefaultStateChart
public interface StateChart<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateState
(String stateID) Activates the state (identified by a potentially non-unique ID) if it exists.void
activateState
(AbstractState<T> state) Activates the state if it exists.void
begin
(StateChartSimIntegrator integrator) Begin state chart.void
followTransition
(String transitionID) Follow the transition (identified by a potentially non-unique ID) if valid.void
followTransition
(Transition<T> transition) Follow the transition if valid.getAgent()
Gets the agent associated with this StateChart.Retrieve current state.double
getStateForUuid
(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) void
receiveMessage
(Object message) Receive a message into the statechart queue.void
void
void
resolve()
void
stop()
Stops the state chart.boolean
withinState
(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()
-