|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTSim.AddingArrayList<E>
public class AddingArrayList<E>
Maintains an ArrayList of elements of type E, with size increased as needed.
Difference to ArrayList's
methods are
- ArrayIndexOutOfBoundException is not thrown when index >= size; instead
size is increased and array filled with null's.
- Methods are synchronized.
Constructor Summary | |
---|---|
AddingArrayList()
Creates an ArrayList using default constructor. |
Method Summary | |
---|---|
E |
get(int index)
Returns element at position index. |
void |
set(int index,
E elem)
Assigns elem at position index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AddingArrayList()
Method Detail |
---|
public void set(int index, E elem)
public E get(int index)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |