|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
proper.util.ProperVector
public class ProperVector
TODO: make Vector.contains(Object) method less error prone...
| Constructor Summary | |
|---|---|
ProperVector()
Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero. |
|
ProperVector(java.util.Collection c)
Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
|
ProperVector(int initialCapacity)
Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero. |
|
ProperVector(int initialCapacity,
int capacityIncrement)
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
for testing only |
java.lang.String |
toCommaList()
returns the content in a string representation, each item separated by a comma (and a blank after the comma) |
java.lang.String |
toCommaList(boolean blank)
returns the content in a string representation, each item separated by a comma (with an optional blank after the comma) |
| 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, 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 |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Constructor Detail |
|---|
public ProperVector()
public ProperVector(java.util.Collection c)
c - the collection whose elements are to be placed into this vector.
public ProperVector(int initialCapacity,
int capacityIncrement)
initialCapacity - the initial capacity of the vector.capacityIncrement - the amount by which the capacity is increased when the vector overflows.public ProperVector(int initialCapacity)
initialCapacity - the initial capacity of the vector.| Method Detail |
|---|
public java.lang.String toCommaList()
public java.lang.String toCommaList(boolean blank)
blank - whether a blank is inserted after the comma
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||