gov.sandia.cognition.framework
Class AbstractCognitiveModel

java.lang.Object
  extended by gov.sandia.cognition.framework.AbstractCognitiveModel
All Implemented Interfaces:
CognitiveModel, Serializable
Direct Known Subclasses:
AbstractCognitiveModelLite

public abstract class AbstractCognitiveModel
extends Object
implements CognitiveModel

The AbstractCognitiveModel class is an abstract class that implements common functionality of classes that implement the CognitiveModel interface may wish to have.

Since:
1.0
Author:
Justin Basilico, Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
AbstractCognitiveModel()
          Creates a new instance of AbstractCognitiveModel.
 
Method Summary
 void addCognitiveModelListener(CognitiveModelListener listener)
          Adds a CognitiveModelListener to this model.
protected  void fireModelStateChangedEvent()
          Triggers the CognitiveModelStateChangeEvent on all the registered CognitiveModelListners.
protected  void fireModelStateChangedEvent(CognitiveModelStateChangeEvent evt)
          Triggers the CognitiveModelStateChangeEvent on all the registered CognitiveModelListners.
 LinkedList<CognitiveModelListener> getModelListeners()
          Getter for the model listeners.
 void removeCognitiveModelListener(CognitiveModelListener listener)
          Removes a CognitiveModelListener from this model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.framework.CognitiveModel
getCurrentState, getModules, getSemanticIdentifierMap, resetCognitiveState, update
 

Constructor Detail

AbstractCognitiveModel

public AbstractCognitiveModel()
Creates a new instance of AbstractCognitiveModel.

Method Detail

addCognitiveModelListener

public void addCognitiveModelListener(CognitiveModelListener listener)
Adds a CognitiveModelListener to this model.

Specified by:
addCognitiveModelListener in interface CognitiveModel
Parameters:
listener - The listener to add

removeCognitiveModelListener

public void removeCognitiveModelListener(CognitiveModelListener listener)
Removes a CognitiveModelListener from this model.

Specified by:
removeCognitiveModelListener in interface CognitiveModel
Parameters:
listener - The listener to remove

fireModelStateChangedEvent

protected void fireModelStateChangedEvent()
Triggers the CognitiveModelStateChangeEvent on all the registered CognitiveModelListners.


fireModelStateChangedEvent

protected void fireModelStateChangedEvent(CognitiveModelStateChangeEvent evt)
Triggers the CognitiveModelStateChangeEvent on all the registered CognitiveModelListners.

Parameters:
evt - The event to pass to the listners

getModelListeners

public LinkedList<CognitiveModelListener> getModelListeners()
Getter for the model listeners.

Returns:
The listeners for the model.