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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ControllerActionVisitor visitor) Accepts the specified visitor.void
batchCleanup
(RunState runState, Object contextId) This performs no action.void
batchInitialize
(RunState runState, Object contextId) Default empty implementation of this method that performs no action.static Context
findContextInRunState
(RunState runState, Object contextId) void
runCleanup
(RunState runState, Object contextId) This delegates torunCleanup(RunState, Context)
after finding the context with the given contextId.abstract void
runCleanup
(RunState runState, Context<? extends T> context) void
runInitialize
(RunState runState, Object contextId, Parameters runParams) This delegates to#runInitialize(RunState, Context)
after finding the context with the given contextId.abstract void
runInitialize
(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:
batchInitialize
in 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:
runInitialize
in 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:
runCleanup
in interfaceControllerAction
- Parameters:
runState
- the runState used for the actioncontextId
- the id used for finding the context
-
batchCleanup
This performs no action.- Specified by:
batchCleanup
in 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
-