de.cesr.more.basic.agent
Class MAgentNetworkComp<A,E extends MoreEdge<? super A>>
java.lang.Object
de.cesr.more.basic.agent.MAgentNetworkComp<A,E>
- Type Parameters:
A
- the common type (of agents) that is contained as nodes in the networks
- All Implemented Interfaces:
- MoreAgentNetworkComp<A,E>
- Direct Known Subclasses:
- MAgentAnalyseNetworkComp
public class MAgentNetworkComp<A,E extends MoreEdge<? super A>>
- extends Object
- implements MoreAgentNetworkComp<A,E>
TODO check if networks of different type are required! TODO make sure not more than one network with same name
inserted
- Date:
- 19.01.2010
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
agent
protected A agent
mainNetwork
protected MoreNetwork<A,E extends MoreEdge<? super A>> mainNetwork
networks
protected Map<String,MoreNetwork<A,E extends MoreEdge<? super A>>> networks
MAgentNetworkComp
public MAgentNetworkComp(A agent)
- Parameters:
agent
-
getNetworks
public Collection<MoreNetwork<A,E>> getNetworks()
- Getter of the property networks
- Specified by:
getNetworks
in interface MoreAgentNetworkComp<A,E extends MoreEdge<? super A>>
- Returns:
- Returns the networks.
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:
de.cesr.more.basic.agent.MoreAgentNetworkComp#setNetwork(de.cesr.lara.components.LaraNetwork)
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)
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()