uchicago.src.sim.space
Interface Cell

All Known Implementing Classes:
BagCell, OrderedCell

public interface Cell

An interface for adding and retrieving the occupants of a grid cell. Multiple occupancy grids allow for more than one object to occupy the cell at a time. This Cell object is container for the multiple occupants of the grid.

Version:
$Revision: 1.5 $ $Date: 2004/11/03 19:50:58 $

Method Summary
 void add(java.lang.Object o)
          Adds an object to this cell.
 void clear()
          Clears all the objects from this cell.
 java.util.List getList()
          Returns a List of the objects contained in this cell.
 java.util.Iterator iterator()
          Returns an Iterator of the objects contained in this cell.
 void remove(java.lang.Object o)
          Removes the specified object from this cell.
 int size()
          Returns the number of objects in this cell.
 

Method Detail

size

int size()
Returns the number of objects in this cell.


clear

void clear()
Clears all the objects from this cell.


add

void add(java.lang.Object o)
Adds an object to this cell.


getList

java.util.List getList()
Returns a List of the objects contained in this cell.


iterator

java.util.Iterator iterator()
Returns an Iterator of the objects contained in this cell.


remove

void remove(java.lang.Object o)
Removes the specified object from this cell.