|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.nengo.model.impl.AbstractNode
public abstract class AbstractNode
A base implementation of Node.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable |
---|
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent, VisiblyMutable.NodeRemovedEvent |
Constructor Summary | |
---|---|
AbstractNode(java.lang.String name,
java.util.List<Origin> origins,
java.util.List<Termination> terminations)
|
Method Summary | |
---|---|
void |
addChangeListener(VisiblyMutable.Listener listener)
|
Node |
clone()
Performs a shallow copy. |
java.lang.String |
getDocumentation()
|
SimulationMode |
getMode()
|
java.lang.String |
getName()
|
Origin |
getOrigin(java.lang.String name)
|
Origin[] |
getOrigins()
|
Termination |
getTermination(java.lang.String name)
|
Termination[] |
getTerminations()
|
void |
removeChangeListener(VisiblyMutable.Listener listener)
|
abstract void |
reset(boolean randomize)
Does nothing. |
abstract void |
run(float startTime,
float endTime)
Does nothing. |
void |
setDocumentation(java.lang.String text)
|
void |
setMode(SimulationMode mode)
Sets the object to run in either the given mode or the closest mode that it supports (all ModeConfigurables must support SimulationMode.DEFAULT, and must default to this mode). |
void |
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractNode(java.lang.String name, java.util.List<Origin> origins, java.util.List<Termination> terminations)
name
- Name of Nodeorigins
- List of Origins from the Nodeterminations
- List of Terminations onto the NodeMethod Detail |
---|
public SimulationMode getMode()
getMode
in interface SimulationMode.ModeConfigurable
SimulationMode.ModeConfigurable.getMode()
public java.lang.String getName()
getName
in interface Node
Node.getName()
public void setName(java.lang.String name) throws StructuralException
setName
in interface Node
name
- The new name
StructuralException
public Origin getOrigin(java.lang.String name) throws StructuralException
getOrigin
in interface Node
name
- Name of an Origin on this Node
StructuralException
- if the named Origin does not existNode.getOrigin(java.lang.String)
public Origin[] getOrigins()
getOrigins
in interface Node
Node.getOrigins()
public Termination getTermination(java.lang.String name) throws StructuralException
getTermination
in interface Node
name
- Name of a Termination onto this Node
StructuralException
- if the named Termination does not existNode.getTermination(java.lang.String)
public Termination[] getTerminations()
getTerminations
in interface Node
Node.getTerminations()
public abstract void run(float startTime, float endTime) throws SimulationException
run
in interface Node
startTime
- simulation time at which running starts (s)endTime
- simulation time at which running ends (s)
SimulationException
- if a problem is encountered while trying to runNode.run(float, float)
public void setMode(SimulationMode mode)
SimulationMode.ModeConfigurable
setMode
in interface SimulationMode.ModeConfigurable
mode
- SimulationMode in which it is desired that the object runs.SimulationMode.ModeConfigurable.setMode(ca.nengo.model.SimulationMode)
public abstract void reset(boolean randomize)
reset
in interface Resettable
randomize
- True indicates that the object should be reset to a
randomly selected initial state (the object must be aware of the
distribution from which to draw from). False indicates that the
object should be reset to a fixed initial state (which it must
also know). Some objects may not support randomization of the initial
state, in which case a fixed state will be used in either case.Resettable.reset(boolean)
public java.lang.String getDocumentation()
getDocumentation
in interface Node
Node.getDocumentation()
public void setDocumentation(java.lang.String text)
setDocumentation
in interface Node
text
- New user-specified documentation for the NodeNode.setDocumentation(java.lang.String)
public void addChangeListener(VisiblyMutable.Listener listener)
addChangeListener
in interface VisiblyMutable
listener
- Listener to addVisiblyMutable.addChangeListener(ca.nengo.util.VisiblyMutable.Listener)
public void removeChangeListener(VisiblyMutable.Listener listener)
removeChangeListener
in interface VisiblyMutable
listener
- Listener to removeVisiblyMutable.removeChangeListener(ca.nengo.util.VisiblyMutable.Listener)
public Node clone() throws java.lang.CloneNotSupportedException
clone
in interface Node
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Object.clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |