|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--inria.util.EntityTable
EntityTable contains a set of entities indexed by ID. An EntityTable is generally cheaper and offers faster access than Hashtable. All entities are sorted in the table by ID.
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
EntityTable()
constructs an EntityTable object. |
|
EntityTable(int initialCapacity,
int increments)
constructs an EntityTable object. |
|
| Method Summary | |
void |
addEntity(Entity obj)
adds the given entity to the table. |
boolean |
containEntity(int id)
contains the entity. |
Entity |
getEntity(int id)
gets the entity. |
void |
removeEntity(Entity obj)
remove the given entity from the table. |
void |
removeEntity(int id)
remove the entity with the given ID from the table. |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public EntityTable()
public EntityTable(int initialCapacity,
int increments)
initialCapacity - the initial capacity.increments - the increments for expanding the table.| Method Detail |
public void addEntity(Entity obj)
obj - the entity to be added.public boolean containEntity(int id)
id - the entity ID.public Entity getEntity(int id)
id - the entity ID.public void removeEntity(Entity obj)
obj - the entity to remove.public void removeEntity(int id)
id - the entity ID.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.