core
Class ConnectivityGrid.GridCell

java.lang.Object
  extended by core.ConnectivityGrid.GridCell
Enclosing class:
ConnectivityGrid

public class ConnectivityGrid.GridCell
extends java.lang.Object

A single cell in the cell grid. Contains the nodes that are currently in that part of the grid.


Method Summary
 void addNode(DTNHost node)
          Adds a node to this cell
 java.util.List<DTNHost> getNodes()
          Returns a list of of nodes in this cell
 void moveNode(DTNHost node, ConnectivityGrid.GridCell to)
          Moves a node in a Cell to another Cell
 java.lang.String toString()
          Returns a string representation of the cell
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getNodes

public java.util.List<DTNHost> getNodes()
Returns a list of of nodes in this cell

Returns:
a list of of nodes in this cell

addNode

public void addNode(DTNHost node)
Adds a node to this cell

Parameters:
node - The node to add

moveNode

public void moveNode(DTNHost node,
                     ConnectivityGrid.GridCell to)
Moves a node in a Cell to another Cell

Parameters:
node - The node to move
to - The cell where the node should be moved to

toString

public java.lang.String toString()
Returns a string representation of the cell

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the cell