semorg.sql.util
Class DistinctVector<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<E>
              extended by semorg.sql.util.DistinctVector<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class DistinctVector<E>
extends Vector<E>

This class complies the class Vector, exclusive the method add(Object) is now thread-safe.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DistinctVector()
          Creates a DistinctVector .
DistinctVector(Collection<? extends E> collection)
          Creates a DistinctVector, which gets initialized with the elements of the given Collection instance.
 
Method Summary
 boolean add(E elem)
          Appends a new element at the end of a DistinctVector.
 
Methods inherited from class java.util.Vector
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, removeRange, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

DistinctVector

public DistinctVector()
Creates a DistinctVector .


DistinctVector

public DistinctVector(Collection<? extends E> collection)
Creates a DistinctVector, which gets initialized with the elements of the given Collection instance.

Parameters:
collection - Collection instance containing elements to initialize the new DistinctVector.
Method Detail

add

public boolean add(E elem)
Appends a new element at the end of a DistinctVector.

Specified by:
add in interface Collection<E>
Specified by:
add in interface List<E>
Overrides:
add in class Vector<E>
See Also:
Vector.add(Object)