|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
edu.neu.ccs.quick.QuickArrayList
QuickArrayList extends ArrayList by
adding one constructor and three methods addItems,
setItems, and removeItems that handle
an array of Object at once.
All constructors of the original ArrayList class
are provided as well.
No changes are made to the internal data structure or to any inherited methods.
| Nested Class Summary |
| Nested classes inherited from class java.util.AbstractList |
|
| Field Summary |
| Fields inherited from class java.util.ArrayList |
|
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
QuickArrayList()
A constructor that delegates to class ArrayList. |
|
QuickArrayList(Collection c)
A constructor that delegates to class ArrayList. |
|
QuickArrayList(int initialCapacity)
A constructor that delegates to class ArrayList. |
|
QuickArrayList(Object[] items)
Constructor that adds the given array of items one-by-one to the array list. |
|
| Method Summary | |
void |
addItems(Object[] items)
Method that adds the given array of items one-by-one to the array list. |
void |
removeItems(Object[] items)
Method that removes the given array of items one-by-one from the array list. |
void |
setItems(Object[] items)
Method that first clears this array list of any existing items and then adds the given array of items one-by-one to the array list. |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
| Constructor Detail |
public QuickArrayList()
ArrayList.
public QuickArrayList(Collection c)
ArrayList.
public QuickArrayList(int initialCapacity)
ArrayList.
public QuickArrayList(Object[] items)
Constructor that adds the given array of items one-by-one to the array list.
The capacity is set to the length of items.
If items is null, then the
capacity is set to 10 (Java default) and nothing is added.
items - the array of items to add to this array listaddItems(Object[])| Method Detail |
public void addItems(Object[] items)
Method that adds the given array of items one-by-one to the array list.
If items is null, then does nothing.
items - the array of items to add to this array listQuickArrayList(Object[]),
setItems(Object[]),
removeItems(Object[])public void setItems(Object[] items)
Method that first clears this array list of any existing items and then adds the given array of items one-by-one to the array list.
If items is null, then this method
is equivalent to the inherited method clear.
items - the array of items to add to this array list after clearanceaddItems(Object[]),
removeItems(Object[])public void removeItems(Object[] items)
Method that removes the given array of items one-by-one from the array list.
If items is null, then does nothing.
items - the array of items to remove from this array listaddItems(Object[]),
setItems(Object[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||