Vector (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
boolean
**[add](../../java/util/Vector.html#add%28E%29)**([E](../../java/util/Vector.html "type parameter in Vector") e)
Appends the specified element to the end of this Vector.
void
**[add](../../java/util/Vector.html#add%28int,%20E%29)**(int index,[E](../../java/util/Vector.html "type parameter in Vector") element)
Inserts the specified element at the specified position in this Vector.
boolean
**[addAll](../../java/util/Vector.html#addAll%28java.util.Collection%29)**([Collection](../../java/util/Collection.html "interface in java.util")<? extends [E](../../java/util/Vector.html "type parameter in Vector")> c)
Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator.
boolean
**[addAll](../../java/util/Vector.html#addAll%28int,%20java.util.Collection%29)**(int index,[Collection](../../java/util/Collection.html "interface in java.util")<? extends [E](../../java/util/Vector.html "type parameter in Vector")> c)
Inserts all of the elements in the specified Collection into this Vector at the specified position.
void
**[addElement](../../java/util/Vector.html#addElement%28E%29)**([E](../../java/util/Vector.html "type parameter in Vector") obj)
Adds the specified component to the end of this vector, increasing its size by one.
int
**[capacity](../../java/util/Vector.html#capacity%28%29)**()
Returns the current capacity of this vector.
void
**[clear](../../java/util/Vector.html#clear%28%29)**()
Removes all of the elements from this Vector.
[Object](../../java/lang/Object.html "class in java.lang")
**[clone](../../java/util/Vector.html#clone%28%29)**()
Returns a clone of this vector.
boolean
**[contains](../../java/util/Vector.html#contains%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") o)
Returns true
if this vector contains the specified element.
boolean
**[containsAll](../../java/util/Vector.html#containsAll%28java.util.Collection%29)**([Collection](../../java/util/Collection.html "interface in java.util")<?> c)
Returns true if this Vector contains all of the elements in the specified Collection.
void
**[copyInto](../../java/util/Vector.html#copyInto%28java.lang.Object[]%29)**([Object](../../java/lang/Object.html "class in java.lang")[] anArray)
Copies the components of this vector into the specified array.
[E](../../java/util/Vector.html "type parameter in Vector")
**[elementAt](../../java/util/Vector.html#elementAt%28int%29)**(int index)
Returns the component at the specified index.
[Enumeration](../../java/util/Enumeration.html "interface in java.util")<[E](../../java/util/Vector.html "type parameter in Vector")>
**[elements](../../java/util/Vector.html#elements%28%29)**()
Returns an enumeration of the components of this vector.
void
**[ensureCapacity](../../java/util/Vector.html#ensureCapacity%28int%29)**(int minCapacity)
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.
boolean
**[equals](../../java/util/Vector.html#equals%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") o)
Compares the specified Object with this Vector for equality.
[E](../../java/util/Vector.html "type parameter in Vector")
**[firstElement](../../java/util/Vector.html#firstElement%28%29)**()
Returns the first component (the item at index 0
) of this vector.
[E](../../java/util/Vector.html "type parameter in Vector")
**[get](../../java/util/Vector.html#get%28int%29)**(int index)
Returns the element at the specified position in this Vector.
int
**[hashCode](../../java/util/Vector.html#hashCode%28%29)**()
Returns the hash code value for this Vector.
int
**[indexOf](../../java/util/Vector.html#indexOf%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") o)
Returns the index of the first occurrence of the specified element in this vector, or -1 if this vector does not contain the element.
int
**[indexOf](../../java/util/Vector.html#indexOf%28java.lang.Object,%20int%29)**([Object](../../java/lang/Object.html "class in java.lang") o, int index)
Returns the index of the first occurrence of the specified element in this vector, searching forwards from index
, or returns -1 if the element is not found.
void
**[insertElementAt](../../java/util/Vector.html#insertElementAt%28E,%20int%29)**([E](../../java/util/Vector.html "type parameter in Vector") obj, int index)
Inserts the specified object as a component in this vector at the specified index
.
boolean
**[isEmpty](../../java/util/Vector.html#isEmpty%28%29)**()
Tests if this vector has no components.
[Iterator](../../java/util/Iterator.html "interface in java.util")<[E](../../java/util/Vector.html "type parameter in Vector")>
**[iterator](../../java/util/Vector.html#iterator%28%29)**()
Returns an iterator over the elements in this list in proper sequence.
[E](../../java/util/Vector.html "type parameter in Vector")
**[lastElement](../../java/util/Vector.html#lastElement%28%29)**()
Returns the last component of the vector.
int
**[lastIndexOf](../../java/util/Vector.html#lastIndexOf%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") o)
Returns the index of the last occurrence of the specified element in this vector, or -1 if this vector does not contain the element.
int
**[lastIndexOf](../../java/util/Vector.html#lastIndexOf%28java.lang.Object,%20int%29)**([Object](../../java/lang/Object.html "class in java.lang") o, int index)
Returns the index of the last occurrence of the specified element in this vector, searching backwards from index
, or returns -1 if the element is not found.
[ListIterator](../../java/util/ListIterator.html "interface in java.util")<[E](../../java/util/Vector.html "type parameter in Vector")>
**[listIterator](../../java/util/Vector.html#listIterator%28%29)**()
Returns a list iterator over the elements in this list (in proper sequence).
[ListIterator](../../java/util/ListIterator.html "interface in java.util")<[E](../../java/util/Vector.html "type parameter in Vector")>
**[listIterator](../../java/util/Vector.html#listIterator%28int%29)**(int index)
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.
[E](../../java/util/Vector.html "type parameter in Vector")
**[remove](../../java/util/Vector.html#remove%28int%29)**(int index)
Removes the element at the specified position in this Vector.
boolean
**[remove](../../java/util/Vector.html#remove%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") o)
Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
boolean
**[removeAll](../../java/util/Vector.html#removeAll%28java.util.Collection%29)**([Collection](../../java/util/Collection.html "interface in java.util")<?> c)
Removes from this Vector all of its elements that are contained in the specified Collection.
void
**[removeAllElements](../../java/util/Vector.html#removeAllElements%28%29)**()
Removes all components from this vector and sets its size to zero.
boolean
**[removeElement](../../java/util/Vector.html#removeElement%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") obj)
Removes the first (lowest-indexed) occurrence of the argument from this vector.
void
**[removeElementAt](../../java/util/Vector.html#removeElementAt%28int%29)**(int index)
Deletes the component at the specified index.
protected void
**[removeRange](../../java/util/Vector.html#removeRange%28int,%20int%29)**(int fromIndex, int toIndex)
Removes from this list all of the elements whose index is betweenfromIndex
, inclusive, and toIndex
, exclusive.
boolean
**[retainAll](../../java/util/Vector.html#retainAll%28java.util.Collection%29)**([Collection](../../java/util/Collection.html "interface in java.util")<?> c)
Retains only the elements in this Vector that are contained in the specified Collection.
[E](../../java/util/Vector.html "type parameter in Vector")
**[set](../../java/util/Vector.html#set%28int,%20E%29)**(int index,[E](../../java/util/Vector.html "type parameter in Vector") element)
Replaces the element at the specified position in this Vector with the specified element.
void
**[setElementAt](../../java/util/Vector.html#setElementAt%28E,%20int%29)**([E](../../java/util/Vector.html "type parameter in Vector") obj, int index)
Sets the component at the specified index
of this vector to be the specified object.
void
**[setSize](../../java/util/Vector.html#setSize%28int%29)**(int newSize)
Sets the size of this vector.
int
**[size](../../java/util/Vector.html#size%28%29)**()
Returns the number of components in this vector.
[List](../../java/util/List.html "interface in java.util")<[E](../../java/util/Vector.html "type parameter in Vector")>
**[subList](../../java/util/Vector.html#subList%28int,%20int%29)**(int fromIndex, int toIndex)
Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
[Object](../../java/lang/Object.html "class in java.lang")[]
**[toArray](../../java/util/Vector.html#toArray%28%29)**()
Returns an array containing all of the elements in this Vector in the correct order.
<T> T[]
**[toArray](../../java/util/Vector.html#toArray%28T[]%29)**(T[] a)
Returns an array containing all of the elements in this Vector in the correct order; the runtime type of the returned array is that of the specified array.
[String](../../java/lang/String.html "class in java.lang")
**[toString](../../java/util/Vector.html#toString%28%29)**()
Returns a string representation of this Vector, containing the String representation of each element.
void
**[trimToSize](../../java/util/Vector.html#trimToSize%28%29)**()
Trims the capacity of this vector to be the vector's current size.