|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.space.BagCell
public class BagCell
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.
| 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 |
|---|
public BagCell()
| Method Detail |
|---|
public boolean contains(java.lang.Object o)
public int size()
size in interface Cellpublic void clear()
clear in interface Cellpublic void add(java.lang.Object o)
add in interface Cellpublic java.util.List getList()
getList in interface Cellpublic java.util.Iterator iterator()
iterator in interface Cellpublic void remove(java.lang.Object o)
remove in interface Cell
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||