|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--monrovia.tools.ArrayIDList
List implementation that gives unique IDs for the values.
Constructor Summary | |
ArrayIDList()
Constructor. |
Method Summary | |
void |
add(int pIndex,
java.lang.Object pObj)
|
boolean |
add(java.lang.Object pObject)
Add an object to the list. |
boolean |
addAll(java.util.Collection pCollection)
|
boolean |
addAll(int pIndex,
java.util.Collection pCollection)
|
void |
clear()
Clear the list. |
boolean |
contains(java.lang.Object pObj)
|
boolean |
containsAll(java.util.Collection pCollection)
|
java.lang.Object |
get(int pID)
Get element with given ID. |
int |
getNextID()
Get the next ID that will be used. |
int |
indexOf(java.lang.Object pObject)
Searches for the first occurence of the given argument, testing for equality using the equals method. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
Returns an iterator over the elements in this list in proper sequence. |
int |
lastIndexOf(java.lang.Object pObject)
Searches for the last occurence of the give argument, testing for equality using the equals method. |
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int pIndex)
|
java.lang.Object |
remove(int pID)
Frees the given ID. |
boolean |
remove(java.lang.Object pObj)
|
boolean |
removeAll(java.util.Collection pCollection)
|
boolean |
retainAll(java.util.Collection pCollection)
|
java.lang.Object |
set(int pIndex,
java.lang.Object pObj)
|
int |
size()
|
java.util.List |
subList(int pFrom,
int pTo)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] pArray)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
equals, hashCode |
Constructor Detail |
public ArrayIDList()
Method Detail |
public int getNextID()
public boolean add(java.lang.Object pObject)
add
in interface java.util.List
pObject
- The object to addNullPointerException
- If the pObject is nullpublic void clear()
clear
in interface java.util.List
public java.lang.Object get(int pID)
get
in interface java.util.List
pID
- ID of the wanted objectpublic int indexOf(java.lang.Object pObject)
indexOf
in interface java.util.List
pObject
- The objectpublic int lastIndexOf(java.lang.Object pObject)
lastIndexOf
in interface java.util.List
pObject
- The objectpublic java.util.Iterator iterator()
iterator
in interface java.util.List
public java.lang.Object remove(int pID)
remove
in interface java.util.List
pID
- ID to removepublic java.lang.String toString()
toString
in class java.lang.Object
public int size()
size
in interface java.util.List
public boolean isEmpty()
isEmpty
in interface java.util.List
public boolean remove(java.lang.Object pObj)
remove
in interface java.util.List
public boolean contains(java.lang.Object pObj)
contains
in interface java.util.List
public java.lang.Object[] toArray()
toArray
in interface java.util.List
public java.lang.Object[] toArray(java.lang.Object[] pArray)
toArray
in interface java.util.List
public boolean containsAll(java.util.Collection pCollection)
containsAll
in interface java.util.List
public boolean addAll(java.util.Collection pCollection)
addAll
in interface java.util.List
public boolean addAll(int pIndex, java.util.Collection pCollection)
addAll
in interface java.util.List
public boolean removeAll(java.util.Collection pCollection)
removeAll
in interface java.util.List
public boolean retainAll(java.util.Collection pCollection)
retainAll
in interface java.util.List
public java.lang.Object set(int pIndex, java.lang.Object pObj)
set
in interface java.util.List
public void add(int pIndex, java.lang.Object pObj)
add
in interface java.util.List
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int pIndex)
listIterator
in interface java.util.List
public java.util.List subList(int pFrom, int pTo)
subList
in interface java.util.List
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |