edu.memphis.ccrg.lida.framework.shared
Class RootableNodeImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
      extended by edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
          extended by edu.memphis.ccrg.lida.framework.shared.NodeImpl
              extended by edu.memphis.ccrg.lida.framework.shared.RootableNodeImpl
All Implemented Interfaces:
Initializable, Activatible, Desirable, Linkable, Node, RootableNode, Condition

public class RootableNodeImpl
extends NodeImpl
implements RootableNode

Default implementation of RootableNode. This feature is not fully implemented in this framework version.

Author:
Ryan J. McCall

Field Summary
 
Fields inherited from class edu.memphis.ccrg.lida.framework.shared.NodeImpl
groundingPamNode
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Desirable
DEFAULT_DESIRABILITY
 
Constructor Summary
RootableNodeImpl()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          This method compares this object with any kind of Node.
 double getDesirability()
          Returns the current desirability of this node.
 double getNetDesirability()
          Gets net desirability
 NodeType getNodeType()
          Gets Node Type.
 double getTotalDesirability()
          Returns the total desirability of this Desirable.
 int hashCode()
           
 void setDesirability(double d)
          Sets node desirability.
 void setNodeType(NodeType t)
          Sets Node type.
 void updateNodeValues(Node n)
          This default implementation of Node has all of its attributes updated by NodeStructureImpl or ElementFactory when nodes are updated.
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.NodeImpl
getConditionId, getExtendedId, getFactoryType, getGroundingPamNode, getId, getLabel, setExtendedId, setFactoryType, setGroundingPamNode, setId, setLabel, toString
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
containsParameter, getParam, getParameters, init, init
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.Node
getGroundingPamNode, getId, getLabel, setGroundingPamNode, setId, setLabel
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.Linkable
getExtendedId, getFactoryType, setFactoryType
 
Methods inherited from interface edu.memphis.ccrg.lida.proceduralmemory.Condition
getConditionId
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 

Constructor Detail

RootableNodeImpl

public RootableNodeImpl()
Method Detail

getDesirability

public double getDesirability()
Description copied from interface: Desirable
Returns the current desirability of this node.

Specified by:
getDesirability in interface Desirable
Returns:
a double signifying the degree to which this node is desired by the agent

setDesirability

public void setDesirability(double d)
Description copied from interface: Desirable
Sets node desirability.

Specified by:
setDesirability in interface Desirable
Parameters:
d - degree to which this node is desired by the agent

getNetDesirability

public double getNetDesirability()
Description copied from interface: Desirable
Gets net desirability

Specified by:
getNetDesirability in interface Desirable
Returns:
the difference between desirability and activation

getNodeType

public NodeType getNodeType()
Description copied from interface: RootableNode
Gets Node Type.

Specified by:
getNodeType in interface RootableNode
Returns:
NodeType

setNodeType

public void setNodeType(NodeType t)
Description copied from interface: RootableNode
Sets Node type.

Specified by:
setNodeType in interface RootableNode
Parameters:
t - NodeType

updateNodeValues

public void updateNodeValues(Node n)
Description copied from class: NodeImpl
This default implementation of Node has all of its attributes updated by NodeStructureImpl or ElementFactory when nodes are updated. Therefore this class does not have to implement this method. Any subclass with specific class members (e.g. PamNodeImpl) should however override this method.

Specified by:
updateNodeValues in interface Node
Overrides:
updateNodeValues in class NodeImpl
Parameters:
n - Node whose values are used to update with.
See Also:
PamNodeImpl.updateNodeValues(Node), NodeStructureImpl.addNode(Node, String)

equals

public boolean equals(java.lang.Object obj)
Description copied from class: NodeImpl
This method compares this object with any kind of Node. returns true if the id of both are the same.

Overrides:
equals in class NodeImpl
Parameters:
obj - Object

hashCode

public int hashCode()
Overrides:
hashCode in class NodeImpl

getTotalDesirability

public double getTotalDesirability()
Description copied from interface: Desirable
Returns the total desirability of this Desirable.

Specified by:
getTotalDesirability in interface Desirable
Returns:
The total desirability. It should return the current desirability if no base-level desirability is used.