edu.memphis.ccrg.lida.proceduralmemory
Class MockProceduralMemory

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

public class MockProceduralMemory
extends FrameworkModuleImpl
implements ProceduralMemory


Field Summary
 
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
taskSpawner
 
Constructor Summary
MockProceduralMemory()
           
 
Method Summary
 void activateSchemes(NodeStructure broadcastContent)
          Using the Broadcast content, activate the relevant schemes of procedural memory
 void addListener(ModuleListener listener)
          Generic way to add various kinds of listeners.
 void addScheme(Scheme s)
          Adds specified scheme to this ProceduralMemory.
 void addSchemes(java.util.Collection<Scheme> schemes)
          Adds specified schemes to this procedural memory.
 void clearInstantiated()
           
 boolean containsScheme(Scheme s)
          Returns whether this procedural memory contains specified scheme.
 void createInstantiation(Scheme s)
          Instantiates specified scheme.
 void decayModule(long ticks)
          Decay only this Module.
 java.lang.Object getModuleContent(java.lang.Object... params)
          Returns module content specified by params.
 SchemeActivationStrategy getSchemeActivationStrategy()
          Returns the SchemeActivationStrategy.
 int getSchemeCount()
          Returns a count of the schemes
 java.util.Collection<Scheme> getTestInstantiated()
           
 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 setSchemeActivationStrategy(SchemeActivationStrategy b)
          Sets the SchemeActivationStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getParam, getSubmodule, getSubmodule, getSubmodules, init, setAssistingTaskSpawner, setAssociatedModule, setModuleName, taskManagerDecayModule, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.FullyInitializable
setAssociatedModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
getParam, init
 

Constructor Detail

MockProceduralMemory

public MockProceduralMemory()
Method Detail

activateSchemes

public void activateSchemes(NodeStructure broadcastContent)
Description copied from interface: ProceduralMemory
Using the Broadcast content, activate the relevant schemes of procedural memory

Specified by:
activateSchemes in interface ProceduralMemory
Parameters:
broadcastContent - conscious contents

addScheme

public void addScheme(Scheme s)
Description copied from interface: ProceduralMemory
Adds specified scheme to this ProceduralMemory.

Specified by:
addScheme in interface ProceduralMemory
Parameters:
s - Scheme

addSchemes

public void addSchemes(java.util.Collection<Scheme> schemes)
Description copied from interface: ProceduralMemory
Adds specified schemes to this procedural memory.

Specified by:
addSchemes in interface ProceduralMemory
Parameters:
schemes - set of Schemes

containsScheme

public boolean containsScheme(Scheme s)
Description copied from interface: ProceduralMemory
Returns whether this procedural memory contains specified scheme.

Specified by:
containsScheme in interface ProceduralMemory
Parameters:
s - a Scheme
Returns:
true if it contains an equal scheme

getSchemeActivationStrategy

public SchemeActivationStrategy getSchemeActivationStrategy()
Description copied from interface: ProceduralMemory
Returns the SchemeActivationStrategy.

Specified by:
getSchemeActivationStrategy in interface ProceduralMemory
Returns:
SchemeActivationStrategy used to activate Schemes

getSchemeCount

public int getSchemeCount()
Description copied from interface: ProceduralMemory
Returns a count of the schemes

Specified by:
getSchemeCount in interface ProceduralMemory
Returns:
number of schemes currently in this procedural memory.

getTestInstantiated

public java.util.Collection<Scheme> getTestInstantiated()

clearInstantiated

public void clearInstantiated()

createInstantiation

public void createInstantiation(Scheme s)
Description copied from interface: ProceduralMemory
Instantiates specified scheme.

Specified by:
createInstantiation in interface ProceduralMemory
Parameters:
s - a scheme over threshold

setSchemeActivationStrategy

public void setSchemeActivationStrategy(SchemeActivationStrategy b)
Description copied from interface: ProceduralMemory
Sets the SchemeActivationStrategy

Specified by:
setSchemeActivationStrategy in interface ProceduralMemory
Parameters:
b - how schemes will be activated based on the broadcast.

addListener

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

Specified by:
addListener in interface FrameworkModule
Parameters:
listener - - listener of this FrameworkModule

decayModule

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

Specified by:
decayModule in interface FrameworkModule
Parameters:
ticks - number of ticks to decay.

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