Package repast.simphony.statecharts
Class DefaultIntegrator
java.lang.Object
repast.simphony.statecharts.DefaultIntegrator
- All Implemented Interfaces:
ContextListener<Object>
,StateChartSimIntegrator
public class DefaultIntegrator
extends Object
implements StateChartSimIntegrator, ContextListener<Object>
Integrates a statechart with a simphony simulation by listening for agent
removal events and stopping the statechart.
- Author:
- Nick Collier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called to nofify the listener of a change to a context.boolean
integrate
(StateChart<?> chart) Integrates the specified StateChart with the larger simulation.void
reset()
Resets this StateChartSimIntegrator.
-
Constructor Details
-
DefaultIntegrator
public DefaultIntegrator()
-
-
Method Details
-
integrate
Description copied from interface:StateChartSimIntegrator
Integrates the specified StateChart with the larger simulation.- Specified by:
integrate
in interfaceStateChartSimIntegrator
- Returns:
- true if the integration worked, otherwise false.
-
reset
public void reset()Description copied from interface:StateChartSimIntegrator
Resets this StateChartSimIntegrator.- Specified by:
reset
in interfaceStateChartSimIntegrator
-
eventOccured
Description copied from interface:ContextListener
Called to nofify the listener of a change to a context.- Specified by:
eventOccured
in interfaceContextListener<Object>
- Parameters:
ev
- The event of which to notify the listener.
-