Package mgui.models.updaters
Class SimpleEnvironmentUpdater
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.models.updaters.SimpleEnvironmentUpdater
- All Implemented Interfaces:
AttributeObject
,InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
,DynamicModelUpdater
- Direct Known Subclasses:
LinearUpdater
,PulseTrainUpdater
,PulseTrainUpdater
public abstract class SimpleEnvironmentUpdater extends AbstractInterfaceObject implements DynamicModelUpdater, AttributeObject
Default super class for environment updaters.
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description AttributeList
attributes
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
Constructors Constructor Description SimpleEnvironmentUpdater()
-
Method Summary
Modifier and Type Method Description protected abstract boolean
doUpdate(DynamicModelEnvironment<?> c, double timeStep)
Attribute<?>
getAttribute(java.lang.String attrName)
Returns a specific attribute for this object.AttributeList
getAttributes()
Returns the list of current attributes for this object.java.lang.Object
getAttributeValue(java.lang.String name)
Gets the value of attributename
, ornull
if it does not exist.protected void
init()
void
setAttribute(java.lang.String attrName, java.lang.Object newValue)
Sets a value for a specific attribute.void
setAttributes(AttributeList thisList)
Sets the list of attributes for this object.void
setTreeNode(InterfaceTreeNode treeNode)
Sets the children for this node'sInterfaceTreeNode
.protected boolean
test(Updateable c, double timeStep)
java.lang.String
toString()
boolean
update(Updateable c, double timeStep)
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getName, getTreeLabel, isDestroyed, issueTreeNode, setName, updateTreeNodes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mgui.models.dynamic.DynamicModelUpdater
reset
Methods inherited from interface mgui.interfaces.NamedObject
getName, setName
-
Field Details
-
attributes
-
-
Constructor Details
-
SimpleEnvironmentUpdater
public SimpleEnvironmentUpdater()
-
-
Method Details
-
update
- Specified by:
update
in interfaceDynamicModelUpdater
-
init
protected void init() -
test
- Throws:
DynamicModelException
-
doUpdate
-
getAttribute
Description copied from interface:AttributeObject
Returns a specific attribute for this object.- Specified by:
getAttribute
in interfaceAttributeObject
- Returns:
-
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
-
getAttributes
Description copied from interface:AttributeObject
Returns the list of current attributes for this object.- Specified by:
getAttributes
in interfaceAttributeObject
- Returns:
-
setAttribute
public void setAttribute(java.lang.String attrName, java.lang.Object newValue)Description copied from interface:AttributeObject
Sets a value for a specific attribute.- Specified by:
setAttribute
in interfaceAttributeObject
-
setAttributes
Description copied from interface:AttributeObject
Sets the list of attributes for this object.- Specified by:
setAttributes
in interfaceAttributeObject
-
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
- Overrides:
setTreeNode
in classAbstractInterfaceObject
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-