|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.dobj.OidList
public class OidList
An oid list is used to store lists of object ids. The list will not allow duplicate ids. This class is not synchronized, with the expectation that all modifications of instances will take place on the dobjmgr thread.
| Nested Class Summary | |
|---|---|
protected class |
OidList.OidIterator
|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected static int |
DEFAULT_SIZE
|
| Constructor Summary | |
|---|---|
OidList()
Creates an empty oid list. |
|
OidList(int initialSize)
Creates an empty oid list with space for at least initialSize object ids before it will need to expand. |
|
| Method Summary | |
|---|---|
boolean |
add(int oid)
Adds the specified object id to the list if it is not already there. |
boolean |
contains(int oid)
Returns true if the specified oid is in the list, false if not. |
int |
get(int index)
Returns the object id at the specified index. |
Iterator<Integer> |
iterator()
|
boolean |
remove(int oid)
Removes the specified oid from the list. |
int |
size()
Returns the number of object ids in the list. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int DEFAULT_SIZE
| Constructor Detail |
|---|
public OidList()
public OidList(int initialSize)
initialSize object ids before it will need to expand.
| Method Detail |
|---|
public int size()
public boolean add(int oid)
public boolean remove(int oid)
public boolean contains(int oid)
public int get(int index)
public String toString()
toString in class Objectpublic Iterator<Integer> iterator()
iterator in interface Iterable<Integer>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||