Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.space
Class BagCell

    java.lang.Object
      uchicago.src.sim.space.BagCell

All Implemented Interfaces:
  Cell

    public class BagCell

extends java.lang.Object
implements Cell

A grid cell whose occupants are stored as if in a bag without order. Removing objects from this type of cell will be faster than from an ordered cell.

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

Constructor Summary
`BagCell()`

Method Summary
`void` | `add(java.lang.Object o)` Adds an object to this cell.
`void` | `clear()` Clears all the objects from this cell.
`boolean` | `contains(java.lang.Object o)` Returns true if this BagCell contains the specified object.
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BagCell

    public BagCell()

Method Detail

### contains

    public boolean contains(java.lang.Object o)

  Returns true if this BagCell contains the specified object.

### size

    public int size()

  Returns the number of objects in this cell.

  Specified by:
    `size` in interface `Cell`

### clear

    public void clear()

  Clears all the objects from this cell.

  Specified by:
    `clear` in interface `Cell`

### add

    public void add(java.lang.Object o)

  Adds an object to this cell.

  Specified by:
    `add` in interface `Cell`

### getList

    public java.util.List getList()

  Returns a List of the objects contained in this cell.

  Specified by:
    `getList` in interface `Cell`

### iterator

    public java.util.Iterator iterator()

  Returns an Iterator of the objects contained in this cell.

  Specified by:
    `iterator` in interface `Cell`

### remove

    public void remove(java.lang.Object o)

  Removes the specified object from this cell.

  Specified by:
    `remove` in interface `Cell`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD