edu.unika.aifb.texttoonto.util
Class Vector

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--edu.unika.aifb.texttoonto.util.Vector

public class Vector
extends Vector
implements Cloneable

The Vector class implements a growable array of objects. Like an array, it contains components that can be accessed using an integer index. However, the size of a Vector can grow or shrink as needed to accommodate adding and removing items after the Vector has been created. Each vector tries to optimize storage management by maintaining a capacity and a capacityIncrement. The capacity is always at least as large as the vector size; it is usually larger because as components are added to the vector, the vector's storage increases in chunks the size of capacityIncrement. An application can increase the capacity of a vector before inserting a large number of components; this reduces the amount of incremental reallocation. As of JDK1.2, this class has been retrofitted to implement List, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Vector is synchronized. The Iterators returned by Vector's iterator and listIterator methods are fail-fast: if the Vector is structurally modified at any time after the Iterator is created, in any way except through the Iterator's own remove or add methods, the Iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the Iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future. The Enumerations returned by Vector's elements method are not fail-fast.


Constructor Summary
Vector()
           
Vector(Object[] array)
          Creates a new Vector whose contents are the elements of array
Vector(int initialCapacity)
           
Vector(int initialCapacity, int capacityIncrement)
           
Vector(Collection c)
           

Method Summary
 booleanaddNotExisting(Object o)
          Adds to this Vector, if anf only if is not already in this Vector
 Vectordifference(Collection to)
          Returns all elements in this Vector that are not element in Collection to
 Objectget(Object name)
          Returns an Object that is equal to
 synchronized intindexOf(Object elem, int index)
           
 Vectorintersection(Collection with)
          Returns all elements in this Vector also contained in Collection with
 StringtoString()
           
 Vectorunion(Collection with)
          Joins this Vector with Collection with

Methods inherited from class java.util.Vector
copyInto, trimToSize, ensureCapacity, setSize, capacity, size, isEmpty, elements, contains, indexOf, lastIndexOf, lastIndexOf, elementAt, firstElement, lastElement, setElementAt, removeElementAt, insertElementAt, addElement, removeElement, removeAllElements, clone, toArray, toArray, get, set, add, remove, add, remove, clear, containsAll, addAll, removeAll, retainAll, addAll, equals, hashCode, subList

Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Vector

public Vector()

Vector

public Vector(Object[] array)
Creates a new Vector whose contents are the elements of array
Parameters:
array - java.lang.Object[]
Since:
(03.06.00 13:29:40)

Vector

public Vector(int initialCapacity)

Vector

public Vector(int initialCapacity, int capacityIncrement)

Vector

public Vector(Collection c)
Method Detail

addNotExisting

public boolean addNotExisting(Object o)
Adds to this Vector, if anf only if is not already in this Vector

difference

public Vector difference(Collection to)
Returns all elements in this Vector that are not element in Collection to

get

public Object get(Object name)
Returns an Object that is equal to

indexOf

public synchronized int indexOf(Object elem, int index)

intersection

public Vector intersection(Collection with)
Returns all elements in this Vector also contained in Collection with

toString

public String toString()

union

public Vector union(Collection with)
Joins this Vector with Collection with