Method Summary |
|
public synchronized void | addElement(Object obj) Adds the specified component to the end of this vector,
increasing its size by one. |
public int | capacity() Returns the current capacity of this vector. |
public boolean | contains(Object elem) Tests if the specified object is a component in this vector.
Parameters: elem - an object. |
public synchronized void | copyInto(Object anArray) Copies the components of this vector into the specified array. |
public synchronized Object | elementAt(int index) Returns the component at the specified index.
Parameters: index - an index into this vector. |
public synchronized Enumeration | elements() Returns an enumeration of the components of this vector. |
public synchronized void | ensureCapacity(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. |
public synchronized Object | firstElement() Returns the first component of this vector. |
public int | indexOf(Object elem) Searches for the first occurrence of the given argument, testing
for equality using the equals method.
Parameters: elem - an object. |
public synchronized int | indexOf(Object elem, int index) Searches for the first occurrence of the given argument, beginning
the search at index , and testing for equality using
the equals method.
Parameters: elem - an object. Parameters: index - the index to start searching from. |
public synchronized void | insertElementAt(Object obj, int index) Inserts the specified object as a component in this vector at the
specified index . |
public boolean | isEmpty() Tests if this vector has no components. |
public synchronized Object | lastElement() Returns the last component of the vector. |
public int | lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in
this vector.
Parameters: elem - the desired component. |
public synchronized int | lastIndexOf(Object elem, int index) Searches backwards for the specified object, starting from the
specified index, and returns an index to it.
Parameters: elem - the desired component. Parameters: index - the index to start searching from. |
public synchronized void | removeAllElements() Removes all components from this vector and sets its size to zero. |
public synchronized boolean | removeElement(Object obj) Removes the first occurrence of the argument from this vector. |
public synchronized void | removeElementAt(int index) Deletes the component at the specified index. |
public synchronized void | setElementAt(Object obj, int index) Sets the component at the specified index of this
vector to be the specified object. |
public synchronized void | setSize(int newSize) Sets the size of this vector. |
public int | size() Returns the number of components in this vector. |
public synchronized String | toString() Returns a string representation of this vector. |
public synchronized void | trimToSize() Trims the capacity of this vector to be the vector's current
size. |