display
Class AgentNode

java.lang.Object
  extended by uchicago.src.sim.network.DefaultNode
      extended by uchicago.src.sim.network.DefaultDrawableNode
          extended by display.Node
              extended by display.AgentNode
All Implemented Interfaces:
uchicago.src.sim.gui.Drawable2DGridNode, uchicago.src.sim.gui.DrawableNonGridNode, uchicago.src.sim.gui.Moveable, uchicago.src.sim.gui.NonGridDrawable, uchicago.src.sim.network.Node

public class AgentNode
extends Node

AgentNode type which is a subclass of the Node


Nested Class Summary
 
Nested classes/interfaces inherited from class uchicago.src.sim.network.DefaultNode
uchicago.src.sim.network.DefaultNode.OrderedHashMap
 
Field Summary
private  Agent agent
          Here single individual (agent) is the node
 
Fields inherited from class display.Node
initEdgeStrength, maxDegree
 
Fields inherited from class uchicago.src.sim.network.DefaultDrawableNode
item
 
Fields inherited from class uchicago.src.sim.network.DefaultNode
inEdges, inMap, label, outEdges, outMap
 
Constructor Summary
AgentNode()
          Default constructor
AgentNode(Agent _agent)
          Sets agent to its node
 
Method Summary
 boolean checkFriendshipLimit(AgentNode node)
          Check if this node can have an additional friend given the friendship upperlimit.
 boolean equals(java.lang.Object o)
          This is needed for tests in contains() operation of node lists
 Agent getAgent()
          Retutrns the agent for this node/
 void meetNeighbor()
          Adaptation from the Repast's implementation for JinGirNew Model.
 void meetRandom(java.util.ArrayList list)
          Adaptation from the Repast's implementation for JinGirNew Model.
 void removeFriend()
          Adaptation from the Repast's implementation for JinGirNew Model.
 void setAgent(Agent agent)
          Sets the agent for this node.
 
Methods inherited from class display.Node
clearEdges, constructEdges, constructEdges, getID, getMaxDegree, init, makeEdgeToFrom, makeEdgeToFrom, removeNode, removeRandomLink, setID, setMaxDegree
 
Methods inherited from class uchicago.src.sim.network.DefaultDrawableNode
allowResizing, calcSize, contains, draw, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getNode, getWidth, getX, getY, setBorderColor, setBorderWidth, setColor, setDrawable, setDrawableNoCopy, setFont, setHeight, setLabelColor, setNodeLabel, setWidth, setX, setX, setY, setY
 
Methods inherited from class uchicago.src.sim.network.DefaultNode
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uchicago.src.sim.gui.DrawableNonGridNode
getOutEdges
 
Methods inherited from interface uchicago.src.sim.gui.Drawable2DGridNode
getOutEdges
 

Field Detail

agent

private Agent agent
Here single individual (agent) is the node

Constructor Detail

AgentNode

public AgentNode()
Default constructor


AgentNode

public AgentNode(Agent _agent)
Sets agent to its node

Parameters:
_agent -
Method Detail

getAgent

public Agent getAgent()
Retutrns the agent for this node/


setAgent

public void setAgent(Agent agent)
Sets the agent for this node.

Parameters:
agent -

equals

public boolean equals(java.lang.Object o)
This is needed for tests in contains() operation of node lists

Specified by:
equals in class Node

meetRandom

public void meetRandom(java.util.ArrayList list)
Adaptation from the Repast's implementation for JinGirNew Model.

Parameters:
list -

meetNeighbor

public void meetNeighbor()
Adaptation from the Repast's implementation for JinGirNew Model.


removeFriend

public void removeFriend()
Adaptation from the Repast's implementation for JinGirNew Model.


checkFriendshipLimit

public boolean checkFriendshipLimit(AgentNode node)
Check if this node can have an additional friend given the friendship upperlimit.

Parameters:
node -
Returns: