de.cesr.more.basic.agent
Class MAbstractNetworkAgent<A,E extends MoreEdge<? super A>>

java.lang.Object
  extended by de.cesr.more.basic.agent.MAbstractNetworkAgent<A,E>
All Implemented Interfaces:
MoreAgentNetworkComp<A,E>, MoreNetworkAgent<A,E>, MoreNodeMeasureSupport
Direct Known Subclasses:
MAbstractAnalyseNetworkAgent

public abstract class MAbstractNetworkAgent<A,E extends MoreEdge<? super A>>
extends Object
implements MoreNetworkAgent<A,E>, MoreAgentNetworkComp<A,E>

MORe

Date:
16.12.2011

Field Summary
protected  MNodeMeasures measures
           
protected  MoreAgentNetworkComp<A,E> netComp
           
 
Constructor Summary
MAbstractNetworkAgent()
          constructor
 
Method Summary
 MoreNetwork<A,E> getMainNetwork()
           
 MoreNetwork<A,E> getNetwork(String name)
           
 MoreAgentNetworkComp<A,E> getNetworkComp()
           
 Number getNetworkMeasureObject(MoreNetwork<? extends MoreNodeMeasureSupport,?> network, MMeasureDescription key)
          Returns the value-object of this vertex for the network measure identified by the network measure key with the network this measure is associated with.
 Collection<MoreNetwork<A,E>> getNetworks()
           
abstract  A getThis()
          Must be implemented in subclasses when the agent type parameter gets concrete.
 void setMainNetwork(MoreNetwork<A,E> network)
           
 void setNetwork(MoreNetwork<A,E> network)
          Registers the given network by the given network's name (network.getName()).
 void setNetworkComp(MoreAgentNetworkComp<A,E> component)
           
 void setNetworkMeasureObject(MoreNetwork<? extends MoreNodeMeasureSupport,?> network, MMeasureDescription key, Number value)
          Sets the value-object of this vertex for the network measure identified by the network measure key with the network this measure is associated with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

netComp

protected MoreAgentNetworkComp<A,E extends MoreEdge<? super A>> netComp

measures

protected MNodeMeasures measures
Constructor Detail

MAbstractNetworkAgent

public MAbstractNetworkAgent()
constructor

Parameters:
env -
Method Detail

getThis

public abstract A getThis()
Must be implemented in subclasses when the agent type parameter gets concrete.

Returns:
reference to this object of the agent parameter's type

getNetworkComp

public MoreAgentNetworkComp<A,E> getNetworkComp()
Specified by:
getNetworkComp in interface MoreNetworkAgent<A,E extends MoreEdge<? super A>>
Returns:
LARA Network Component
See Also:
LaraAgent.getLaraComp()

setNetworkComp

public void setNetworkComp(MoreAgentNetworkComp<A,E> component)
Specified by:
setNetworkComp in interface MoreNetworkAgent<A,E extends MoreEdge<? super A>>
See Also:
de.cesr.more.lara.agent.LaraSimpleNetworkAgent#setLaraNetworkComp(de.cesr.more.basic.agent.MoreAgentNetworkComp)

getNetwork

public MoreNetwork<A,E> getNetwork(String name)
Specified by:
getNetwork in interface MoreAgentNetworkComp<A,E extends MoreEdge<? super A>>
Returns:
the network with the given name
See Also:
MoreAgentNetworkComp.getNetwork(java.lang.String)

setNetwork

public void setNetwork(MoreNetwork<A,E> network)
Description copied from interface: MoreAgentNetworkComp
Registers the given network by the given network's name (network.getName()). If it is the first network registered the given network also becomes main network.

Specified by:
setNetwork in interface MoreAgentNetworkComp<A,E extends MoreEdge<? super A>>
See Also:
MoreAgentNetworkComp.setNetwork(de.cesr.more.basic.network.MoreNetwork)

getNetworks

public Collection<MoreNetwork<A,E>> getNetworks()
Specified by:
getNetworks in interface MoreAgentNetworkComp<A,E extends MoreEdge<? super A>>
Returns:
collection of all networks
See Also:
MoreAgentNetworkComp.getNetworks()

setMainNetwork

public void setMainNetwork(MoreNetwork<A,E> network)
Specified by:
setMainNetwork in interface MoreAgentNetworkComp<A,E extends MoreEdge<? super A>>
See Also:
MoreAgentNetworkComp.setMainNetwork(de.cesr.more.basic.network.MoreNetwork)

getMainNetwork

public MoreNetwork<A,E> getMainNetwork()
Specified by:
getMainNetwork in interface MoreAgentNetworkComp<A,E extends MoreEdge<? super A>>
Returns:
the agent's main social network
See Also:
MoreAgentNetworkComp.getMainNetwork()

getNetworkMeasureObject

public Number getNetworkMeasureObject(MoreNetwork<? extends MoreNodeMeasureSupport,?> network,
                                      MMeasureDescription key)
Description copied from interface: MoreNodeMeasureSupport
Returns the value-object of this vertex for the network measure identified by the network measure key with the network this measure is associated with.

Specified by:
getNetworkMeasureObject in interface MoreNodeMeasureSupport
Parameters:
network - The Network the measure value to set is associated with
key - The Key that identifies the measure to set
Returns:
value The Value of this vertex for the given network measure key, null if the specified measure key has not been set.
See Also:
MoreNodeMeasureSupport.getNetworkMeasureObject(de.cesr.more.basic.network.MoreNetwork, de.cesr.more.measures.MMeasureDescription)

setNetworkMeasureObject

public void setNetworkMeasureObject(MoreNetwork<? extends MoreNodeMeasureSupport,?> network,
                                    MMeasureDescription key,
                                    Number value)
Description copied from interface: MoreNodeMeasureSupport
Sets the value-object of this vertex for the network measure identified by the network measure key with the network this measure is associated with.

Specified by:
setNetworkMeasureObject in interface MoreNodeMeasureSupport
Parameters:
network - The Network the measure value to set is associated with
key - The Key that identifies the measure to set
value - Value-object of measure to set
See Also:
MoreNodeMeasureSupport.setNetworkMeasureObject(de.cesr.more.basic.network.MoreNetwork, de.cesr.more.measures.MMeasureDescription, java.lang.Number)