Class DefaultContextSchedulableControllerAction<T>
- java.lang.Object
-
- repast.simphony.engine.controller.AbstractControllerAction<T>
-
- repast.simphony.engine.controller.NullAbstractControllerAction
-
- repast.simphony.engine.controller.DefaultContextSchedulableControllerAction<T>
-
- All Implemented Interfaces:
DescriptorControllerAction<ContextSchedulableDescriptor<T>>
,ControllerAction
public class DefaultContextSchedulableControllerAction<T> extends NullAbstractControllerAction implements DescriptorControllerAction<ContextSchedulableDescriptor<T>>
An action that takes aContextSchedulableDescriptor
and schedules it usingISchedule.scheduleIterable(ScheduleParameters, Iterable, String, boolean, Object...)
. The scheduled Iterable will be a FilterIterable that takes in the context and the descriptor's filter. The method name will be that returned by the descriptor.- Author:
- Jerry Vos
-
-
Constructor Summary
Constructors Constructor Description DefaultContextSchedulableControllerAction(ContextSchedulableDescriptor<T> descriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterable
getContextFilter(Context context, org.apache.commons.collections15.Predicate filter)
ContextSchedulableDescriptor<T>
getDescriptor()
void
runInitialize(RunState runState, Context context, Parameters runParams)
Schedules on the model schedule the descriptor's iterable with it executing the descriptor's method name.-
Methods inherited from class repast.simphony.engine.controller.NullAbstractControllerAction
runCleanup
-
Methods inherited from class repast.simphony.engine.controller.AbstractControllerAction
accept, batchCleanup, batchInitialize, findContextInRunState, runCleanup, runInitialize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface repast.simphony.engine.environment.ControllerAction
batchCleanup, batchInitialize, runCleanup, runInitialize
-
-
-
-
Constructor Detail
-
DefaultContextSchedulableControllerAction
public DefaultContextSchedulableControllerAction(ContextSchedulableDescriptor<T> descriptor)
-
-
Method Detail
-
getDescriptor
public ContextSchedulableDescriptor<T> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescriptorControllerAction<T>
-
runInitialize
public void runInitialize(RunState runState, Context context, Parameters runParams)
Schedules on the model schedule the descriptor's iterable with it executing the descriptor's method name.- Overrides:
runInitialize
in classNullAbstractControllerAction
- Parameters:
runState
- the RunState to fetch the model schedule fromcontext
- the context that will be used to filter agents from
-
-