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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled to nofify the listener of a change to a context.booleanintegrate(StateChart<?> chart) Integrates the specified StateChart with the larger simulation.voidreset()Resets this StateChartSimIntegrator.
-
Constructor Details
-
DefaultIntegrator
public DefaultIntegrator()
-
-
Method Details
-
integrate
Description copied from interface:StateChartSimIntegratorIntegrates the specified StateChart with the larger simulation.- Specified by:
integratein interfaceStateChartSimIntegrator- Returns:
- true if the integration worked, otherwise false.
-
reset
public void reset()Description copied from interface:StateChartSimIntegratorResets this StateChartSimIntegrator.- Specified by:
resetin interfaceStateChartSimIntegrator
-
eventOccured
Description copied from interface:ContextListenerCalled to nofify the listener of a change to a context.- Specified by:
eventOccuredin interfaceContextListener<Object>- Parameters:
ev- The event of which to notify the listener.
-