|
||||||||||
| 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.Vector
edu.neu.ccs.quick.QuickVector
QuickVector extends Vector by
adding one constructor and three methods addItems,
setItems, and removeItems that handle
an array of Object at once.
All constructors of the original Vector 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.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
QuickVector()
A constructor that delegates to class Vector. |
|
QuickVector(Collection c)
A constructor that delegates to class Vector. |
|
QuickVector(int initialCapacity)
A constructor that delegates to class Vector. |
|
QuickVector(int initialCapacity,
int capacityIncrement)
A constructor that delegates to class Vector. |
|
QuickVector(Object[] items)
Constructor that adds the given array of items one-by-one to the vector. |
|
| Method Summary | |
void |
addItems(Object[] items)
Method that adds the given array of items one-by-one to the vector. |
void |
removeItems(Object[] items)
Method that removes the given array of items one-by-one from the vector. |
void |
setItems(Object[] items)
Method that first clears this vector of any existing items and then adds the given array of items one-by-one to the vector. |
| 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 QuickVector()
Vector.
public QuickVector(Collection c)
Vector.
public QuickVector(int initialCapacity)
Vector.
public QuickVector(int initialCapacity,
int capacityIncrement)
Vector.
public QuickVector(Object[] items)
Constructor that adds the given array of items one-by-one to the vector.
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 vectoraddItems(Object[])| Method Detail |
public void addItems(Object[] items)
Method that adds the given array of items one-by-one to the vector.
If items is null, then does nothing.
items - the array of items to add to this vectorQuickVector(Object[]),
setItems(Object[]),
removeItems(Object[])public void setItems(Object[] items)
Method that first clears this vector of any existing items and then adds the given array of items one-by-one to the vector.
If items is null, then this method
is equivalent to the inherited method clear.
items - the array of items to add to this vector after clearanceaddItems(Object[]),
removeItems(Object[])public void removeItems(Object[] items)
Method that removes the given array of items one-by-one from the vector.
If items is null, then does nothing.
items - the array of items to remove from this vectoraddItems(Object[]),
setItems(Object[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||