Class AbstractControllerAction<T>
java.lang.Object
repast.simphony.engine.controller.AbstractControllerAction<T>
- All Implemented Interfaces:
ControllerAction
- Direct Known Subclasses:
NullAbstractControllerAction
An abstract
ControllerAction that aims to
simplify the implementation of ControllerActions. This class searches the
RunState- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Jerry Vos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ControllerActionVisitor visitor) Accepts the specified visitor.voidbatchCleanup(RunState runState, Object contextId) This performs no action.voidbatchInitialize(RunState runState, Object contextId) Default empty implementation of this method that performs no action.static ContextfindContextInRunState(RunState runState, Object contextId) voidrunCleanup(RunState runState, Object contextId) This delegates torunCleanup(RunState, Context)after finding the context with the given contextId.abstract voidrunCleanup(RunState runState, Context<? extends T> context) voidrunInitialize(RunState runState, Object contextId, Parameters runParams) This delegates to#runInitialize(RunState, Context)after finding the context with the given contextId.abstract voidrunInitialize(RunState runState, Context<? extends T> context, Parameters runParams)
-
Constructor Details
-
AbstractControllerAction
public AbstractControllerAction()
-
-
Method Details
-
batchInitialize
Default empty implementation of this method that performs no action. If a subclass should perform batch initialization override this method.- Specified by:
batchInitializein interfaceControllerAction- Parameters:
runState- the runState used for the actioncontextId- the id used for finding the context
-
runInitialize
This delegates to#runInitialize(RunState, Context)after finding the context with the given contextId. This is the same asrunInitialize(runState, findContextInRunState(runState, contextId));- Specified by:
runInitializein interfaceControllerAction- Parameters:
runState- the runState used for the actioncontextId- the id used for finding the contextrunParams- the current run's parameters
-
runCleanup
This delegates torunCleanup(RunState, Context)after finding the context with the given contextId. This is the same asrunCleanup(runState, findContextInRunState(runState, contextId));- Specified by:
runCleanupin interfaceControllerAction- Parameters:
runState- the runState used for the actioncontextId- the id used for finding the context
-
batchCleanup
This performs no action.- Specified by:
batchCleanupin interfaceControllerAction- Parameters:
runState- the runState used for the actioncontextId- the id used for finding the context
-
runInitialize
public abstract void runInitialize(RunState runState, Context<? extends T> context, Parameters runParams) -
runCleanup
-
findContextInRunState
-
accept
Accepts the specified visitor. This calls the default visit method.- Parameters:
visitor- the visitor to accept
-