org.simnet.coupling
Class Coupling

java.lang.Object
  extended by org.simnet.coupling.Coupling
Direct Known Subclasses:
MotorCoupling, SensoryCoupling

public class Coupling
extends Object

Coupling represents a relation between an agent and an input or output node.


Constructor Summary
Coupling()
          Create a new coupling.
Coupling(Agent a)
          Create a new coupling with the specified agent.
Coupling(Agent a, Neuron n)
          Create a new coupling with the specified agent and neuron.
Coupling(Neuron n)
          Create a new coupling with the specified neuron.
 
Method Summary
 Agent getAgent()
          Return the agent for this coupling.
 String getAgentName()
          Return the agent name for this coupling.
 String getNetworkName()
          Return the network name for this coupling.
 Neuron getNeuron()
          Return the neuron for this coupling.
 String getNeuronName()
          Return the neuron name for this coupling.
 World getWorld()
          Return the world for this coupling, that is the parent world of this coupling's agent, or null if this coupling's agent is null.
 String getWorldName()
          Return the world name for this coupling.
 String getWorldType()
          Return the world type for this coupling.
 void initCastor()
          Initialize Castor support for this coupling.
 boolean isAttached()
          Return true if this coupling has an associated agent, that is if getAgent() != null.
 void setAgent(Agent agent)
          Set the agent for this coupling to agent.
 void setAgentName(String agentName)
          Set the agent name for this coupling to agentName.
 void setNetworkName(String networkName)
          Set the network name for this coupling to networkName.
 void setNeuron(Neuron neuron)
          Set the neuron for this coupling to neuron.
 void setNeuronName(String neuronName)
          Set the neuron name for this coupling to neuronName.
 void setWorldName(String worldName)
          Set the world name for this coupling to worldName.
 void setWorldType(String worldType)
          Set the world type for this coupling to worldType.
 String toString()
          Print debug information to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Coupling

public Coupling()
Create a new coupling.


Coupling

public Coupling(Agent a,
                Neuron n)
Create a new coupling with the specified agent and neuron.

Parameters:
a - agent for this coupling
n - neuron for this coupling

Coupling

public Coupling(Neuron n)
Create a new coupling with the specified neuron.

Parameters:
n - neuron for this coupling

Coupling

public Coupling(Agent a)
Create a new coupling with the specified agent.

Parameters:
a - agent for this coupling
Method Detail

getAgent

public Agent getAgent()
Return the agent for this coupling.

Returns:
the agent for this coupling

getWorld

public World getWorld()
Return the world for this coupling, that is the parent world of this coupling's agent, or null if this coupling's agent is null.

Returns:
the world for this coupling, or null if this coupling's agent is null

setAgent

public void setAgent(Agent agent)
Set the agent for this coupling to agent.

Parameters:
agent - the agent for this coupling

initCastor

public void initCastor()
Initialize Castor support for this coupling.


getAgentName

public String getAgentName()
Return the agent name for this coupling.

Returns:
the agent name for this coupling

setAgentName

public void setAgentName(String agentName)
Set the agent name for this coupling to agentName.

Parameters:
agentName - agent name for this coupling

getWorldName

public String getWorldName()
Return the world name for this coupling.

Returns:
the world name for this coupling

setWorldName

public void setWorldName(String worldName)
Set the world name for this coupling to worldName.

Parameters:
worldName - world name for this coupling

getWorldType

public String getWorldType()
Return the world type for this coupling.

Returns:
the world type for this coupling

setWorldType

public void setWorldType(String worldType)
Set the world type for this coupling to worldType.

Parameters:
worldType - world type for this coupling

getNeuron

public Neuron getNeuron()
Return the neuron for this coupling.

Returns:
the neuron for this coupling

setNeuron

public void setNeuron(Neuron neuron)
Set the neuron for this coupling to neuron.

Parameters:
neuron - neuron for this coupling

getNeuronName

public String getNeuronName()
Return the neuron name for this coupling.

Returns:
the neuron name for this coupling

setNeuronName

public void setNeuronName(String neuronName)
Set the neuron name for this coupling to neuronName.

Parameters:
neuronName - neuron name for this coupling

toString

public String toString()
Print debug information to System.out.

Overrides:
toString in class Object
Returns:
String

getNetworkName

public String getNetworkName()
Return the network name for this coupling.

Returns:
the network name for this coupling

setNetworkName

public void setNetworkName(String networkName)
Set the network name for this coupling to networkName.

Parameters:
networkName - network name for this coupling

isAttached

public boolean isAttached()
Return true if this coupling has an associated agent, that is if getAgent() != null.

Returns:
true if this coupling has an associated agent