edu.memphis.ccrg.lida.framework.mockclasses
Class MockFrameworkModule

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
      extended by edu.memphis.ccrg.lida.framework.mockclasses.MockFrameworkModule
All Implemented Interfaces:
FrameworkModule, FullyInitializable, Initializable

public class MockFrameworkModule
extends FrameworkModuleImpl


Field Summary
 FrameworkModule associatedModule
           
 long decayTicks
           
 java.util.List<ModuleListener> listeners
           
 java.lang.String moduleUsage
           
 boolean wasDecayed
           
 
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
taskSpawner
 
Constructor Summary
MockFrameworkModule()
           
 
Method Summary
 void addListener(ModuleListener listener)
          Generic way to add various kinds of listeners.
 void decayModule(long ticks)
          Decay only this Module.
 java.lang.Object getModuleContent(java.lang.Object... params)
          Returns module content specified by params.
 void init()
          Implementations should only perform initialization of variables or objects that depend on parameters in the parameter map specified in FrameworkModuleImpl.init(Map).
 void setAssociatedModule(FrameworkModule module, java.lang.String moduleUsage)
          Sets an associated FrameworkModule.
 
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getParam, getSubmodule, getSubmodule, getSubmodules, init, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wasDecayed

public boolean wasDecayed

decayTicks

public long decayTicks

listeners

public java.util.List<ModuleListener> listeners

associatedModule

public FrameworkModule associatedModule

moduleUsage

public java.lang.String moduleUsage
Constructor Detail

MockFrameworkModule

public MockFrameworkModule()
Method Detail

getModuleContent

public java.lang.Object getModuleContent(java.lang.Object... params)
Description copied from interface: FrameworkModule
Returns module content specified by params. Should only be used by the GUI.

Specified by:
getModuleContent in interface FrameworkModule
Specified by:
getModuleContent in class FrameworkModuleImpl
Parameters:
params - - specifies what content will be returned.
Returns:
various kinds of content of this module.

init

public void init()
Description copied from class: FrameworkModuleImpl
Implementations should only perform initialization of variables or objects that depend on parameters in the parameter map specified in FrameworkModuleImpl.init(Map). Furthermore they should not try to access modules added via FrameworkModuleImpl.setAssociatedModule(FrameworkModule, String) as this method will not have run yet at the time this method is called.

Specified by:
init in interface Initializable
Specified by:
init in class FrameworkModuleImpl

addListener

public void addListener(ModuleListener listener)
Description copied from interface: FrameworkModule
Generic way to add various kinds of listeners.

Parameters:
listener - - listener of this FrameworkModule

decayModule

public void decayModule(long ticks)
Description copied from interface: FrameworkModule
Decay only this Module.

Parameters:
ticks - number of ticks to decay.

setAssociatedModule

public void setAssociatedModule(FrameworkModule module,
                                java.lang.String moduleUsage)
Description copied from interface: FullyInitializable
Sets an associated FrameworkModule.

Specified by:
setAssociatedModule in interface FullyInitializable
Overrides:
setAssociatedModule in class FrameworkModuleImpl
Parameters:
module - the module to be associated.
moduleUsage - how module will be used @see ModuleUsage