org.paneris.util
Class UniqueVector

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by org.paneris.util.JoinVector
                  extended by org.paneris.util.UniqueVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class UniqueVector
extends JoinVector

This extends a vector, it has an additional method that simply prevents duplicate values being put into it.

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
UniqueVector()
          constructor
UniqueVector(int initialCapacity)
          constructor with an initial capacity
UniqueVector(int initialCapacity, int capacityIncrement)
          constructor with an initial capacity and a capacity increment
 
Method Summary
 boolean addUniqueElement(java.lang.Object obj)
          add an element to the vector, but only if it is not already there
 
Methods inherited from class org.paneris.util.JoinVector
join
 
Methods inherited from class java.util.Vector
add, 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

UniqueVector

public UniqueVector()
constructor


UniqueVector

public UniqueVector(int initialCapacity)
constructor with an initial capacity


UniqueVector

public UniqueVector(int initialCapacity,
                    int capacityIncrement)
constructor with an initial capacity and a capacity increment

Method Detail

addUniqueElement

public boolean addUniqueElement(java.lang.Object obj)
add an element to the vector, but only if it is not already there

Returns:
true if the element has been sucessfully added, false otherwise


Copyright © 2000-2008 PanEris. All Rights Reserved.