Package mgui.models.networks.components
Class AbstractNetworkComponent
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.models.networks.components.AbstractNetworkComponent
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<DynamicModelComponent>
,AttributeListener
,AttributeObject
,InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
,DynamicModelComponent
,TimeStepListener
,Updateable
- Direct Known Subclasses:
AbstractNeuroComponent
public abstract class AbstractNetworkComponent extends AbstractInterfaceObject implements DynamicModelComponent, AttributeObject, AttributeListener, TreeObject, InterfaceObject
Abstract generic class for neuro model components to inherit. Contains two lists, one for
events and one for connections. This class forces an implementation of clone()
by its
subclasses; as a general policy clones of model components should ensure that components
states are also preserved in a clone.
All subclasses of this class should add its parameters as Attribute
s. These
parameters should have their own get and set methods implemented. Primitives should be wrapped
by instances of arNumber
(java wrappers such as Integer
are fine too, but do not allow their
values to be dynamically changed...)
Variables (e.g., clock) should be declared as individual class members.
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
Constructors Constructor Description AbstractNetworkComponent()
-
Method Summary
Modifier and Type Method Description java.lang.Object
clone()
java.lang.Object
getAttributeValue(java.lang.String name)
Gets the value of attributename
, ornull
if it does not exist.Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getName, getTreeLabel, isDestroyed, issueTreeNode, setName, setTreeNode, updateTreeNodes
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mgui.interfaces.attributes.AttributeListener
attributeUpdated
Methods inherited from interface mgui.interfaces.attributes.AttributeObject
getAttribute, getAttributes, setAttribute, setAttributes
Methods inherited from interface mgui.interfaces.util.CleanableObject
clean
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface mgui.models.dynamic.DynamicModelComponent
addConnection, addEvent, addToEngine, executeEvents, getID, getSubComponents, hasSubComponents, removeConnection, reset, setID, setID
Methods inherited from interface mgui.interfaces.InterfaceObject
destroy, isDestroyed
Methods inherited from interface mgui.interfaces.NamedObject
getName, setName
Methods inherited from interface mgui.models.dynamic.TimeStepListener
timeElapsed
Methods inherited from interface mgui.interfaces.trees.TreeObject
getTreeLabel, issueTreeNode, setTreeNode
-
Constructor Details
-
AbstractNetworkComponent
public AbstractNetworkComponent()
-
-
Method Details
-
clone
public java.lang.Object clone()- Specified by:
clone
in interfaceDynamicModelComponent
- Overrides:
clone
in classjava.lang.Object
-
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.String name)Description copied from interface:AttributeObject
Gets the value of attributename
, ornull
if it does not exist.- Specified by:
getAttributeValue
in interfaceAttributeObject
- Parameters:
name
- Name of the attribute- Returns:
- the value of attribute
name
, ornull
if it does not exist
-