Fields
| Name | Description |
|---|---|
| capacityIncrement | The amount by which the capacity of the vector is automatically incremented when its size becomes greater than its capacity. |
| elementCount | The number of valid components in the vector. |
| elementData | The array buffer into which the components of the vector are stored. |
Constructors
| Name | Description |
|---|---|
| Vector() | Constructs an empty vector. |
| Vector(int) | Constructs an empty vector with the specified initial capacity. |
| Vector(int, int) | Constructs an empty vector with the specified initial capacity and capacity increment. |
Methods
| Name | Description |
|---|---|
| addElement(Object) | Adds the specified component to the end of this vector, increasing its size by one. |
| capacity() | Returns the current capacity of this vector. |
| clone() | Returns a clone of this vector. |
| contains(Object) | Tests if the specified object is a component in this vector. |
| copyInto(Object[]) | Copies the components of this vector into the specified array. |
| elementAt(int) | Returns the component at the specified index. |
| elements() | Returns an enumeration of the components of this vector. |
| ensureCapacity(int) | Increases the capacity of this vector, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument. |
| firstElement() | Returns the first component of this vector. |
| indexOf(Object) | Searches for the first occurence of the given argument, testing for equality using the equals method. |
| indexOf(Object, int) | Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method. |
| insertElementAt(Object, int) | Inserts the specified object as a component in this vector at the specified index. |
| isEmpty() | Tests if this vector has no components. |
| lastElement() | Returns the last component of the vector. |
| lastIndexOf(Object) | Returns the index of the last occurrence of the specified object in this vector. |
| lastIndexOf(Object, int) | Searches backwards for the specified object, starting from the specified index, and returns an index to it. |
| removeAllElements() | Removes all components from this vector and sets its size to zero. |
| removeElement(Object) | Removes the first occurrence of the argument from this vector. |
| removeElementAt(int) | Deletes the component at the specified index. |
| setElementAt(Object, int) | Sets the component at the specified index of this vector to be the specified object. |
| setSize(int) | Sets the size of this vector. |
| size() | Returns the number of components in this vector. |
| toString() | Returns a string representation of this vector. |
| trimToSize() | Trims the capacity of this vector to be the vector's current size. |