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 Constructor Description DefaultIntegrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
eventOccured(ContextEvent<Object> ev)
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.
-
-
-
Method Detail
-
integrate
public boolean integrate(StateChart<?> chart)
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
public void eventOccured(ContextEvent<Object> ev)
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.
-
-