org.apache.tools.ant.util
Class VectorSet<E>
java.lang.Object
   java.util.AbstractCollection<E>
java.util.AbstractCollection<E>
       java.util.AbstractList<E>
java.util.AbstractList<E>
           java.util.Vector<E>
java.util.Vector<E>
               org.apache.tools.ant.util.VectorSet<E>
org.apache.tools.ant.util.VectorSet<E>
- All Implemented Interfaces: 
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess
- public final class VectorSet<E> 
- extends java.util.Vector<E>
Subclass of Vector that won't store duplicate entries and shows
 HashSet's constant time performance characteristics for the
 contains method.
 
This is not a general purpose class but has been written because
 the protected members of DirectoryScanner prohibited
 later revisions from using a more efficient collection.
 Methods are synchronized to keep Vector's contract.
- Since:
- Ant 1.8.0
- See Also:
- Serialized Form
 
| Fields inherited from class java.util.Vector | 
| capacityIncrement, elementCount, elementData | 
 
| Fields inherited from class java.util.AbstractList | 
| modCount | 
 
 
| Method Summary | 
|  boolean | add(E o)
 | 
|  void | add(int index,
    E o)This implementation may not add the element at the given index
 if it is already contained in the collection.
 | 
|  boolean | addAll(java.util.Collection<? extends E> c)
 | 
|  boolean | addAll(int index,
       java.util.Collection<? extends E> c)This implementation may not add all elements at the given index
 if any of them are already contained in the collection.
 | 
|  void | addElement(E o)
 | 
|  void | clear()
 | 
|  java.lang.Object | clone()
 | 
|  boolean | contains(java.lang.Object o)
 | 
|  boolean | containsAll(java.util.Collection<?> c)
 | 
|  void | insertElementAt(E o,
                int index)
 | 
|  E | remove(int index)
 | 
|  boolean | remove(java.lang.Object o)
 | 
|  boolean | removeAll(java.util.Collection<?> c)
 | 
|  void | removeAllElements()
 | 
|  boolean | removeElement(java.lang.Object o)
 | 
|  void | removeElementAt(int index)
 | 
|  void | removeRange(int fromIndex,
            int toIndex)
 | 
|  boolean | retainAll(java.util.Collection<?> c)
 | 
|  E | set(int index,
    E o)
 | 
|  void | setElementAt(E o,
             int index)
 | 
 
| Methods inherited from class java.util.Vector | 
| capacity, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, 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 | 
 
VectorSet
public VectorSet()
VectorSet
public VectorSet(int initialCapacity)
VectorSet
public VectorSet(int initialCapacity,
                 int capacityIncrement)
VectorSet
public VectorSet(java.util.Collection<? extends E> c)
add
public boolean add(E o)
- 
- Specified by:
- addin interface- java.util.Collection<E>
- Specified by:
- addin interface- java.util.List<E>
- Overrides:
- addin class- java.util.Vector<E>
 
- 
 
add
public void add(int index,
                E o)
- This implementation may not add the element at the given index
 if it is already contained in the collection.
 
- 
- Specified by:
- addin interface- java.util.List<E>
- Overrides:
- addin class- java.util.Vector<E>
 
- 
 
addElement
public void addElement(E o)
- 
- Overrides:
- addElementin class- java.util.Vector<E>
 
- 
 
addAll
public boolean addAll(java.util.Collection<? extends E> c)
- 
- Specified by:
- addAllin interface- java.util.Collection<E>
- Specified by:
- addAllin interface- java.util.List<E>
- Overrides:
- addAllin class- java.util.Vector<E>
 
- 
 
addAll
public boolean addAll(int index,
                      java.util.Collection<? extends E> c)
- This implementation may not add all elements at the given index
 if any of them are already contained in the collection.
 
- 
- Specified by:
- addAllin interface- java.util.List<E>
- Overrides:
- addAllin class- java.util.Vector<E>
 
- 
 
clear
public void clear()
- 
- Specified by:
- clearin interface- java.util.Collection<E>
- Specified by:
- clearin interface- java.util.List<E>
- Overrides:
- clearin class- java.util.Vector<E>
 
- 
 
clone
public java.lang.Object clone()
- 
- Overrides:
- clonein class- java.util.Vector<E>
 
- 
 
contains
public boolean contains(java.lang.Object o)
- 
- Specified by:
- containsin interface- java.util.Collection<E>
- Specified by:
- containsin interface- java.util.List<E>
- Overrides:
- containsin class- java.util.Vector<E>
 
- 
 
containsAll
public boolean containsAll(java.util.Collection<?> c)
- 
- Specified by:
- containsAllin interface- java.util.Collection<E>
- Specified by:
- containsAllin interface- java.util.List<E>
- Overrides:
- containsAllin class- java.util.Vector<E>
 
- 
 
insertElementAt
public void insertElementAt(E o,
                            int index)
- 
- Overrides:
- insertElementAtin class- java.util.Vector<E>
 
- 
 
remove
public E remove(int index)
- 
- Specified by:
- removein interface- java.util.List<E>
- Overrides:
- removein class- java.util.Vector<E>
 
- 
 
remove
public boolean remove(java.lang.Object o)
- 
- Specified by:
- removein interface- java.util.Collection<E>
- Specified by:
- removein interface- java.util.List<E>
- Overrides:
- removein class- java.util.Vector<E>
 
- 
 
removeAll
public boolean removeAll(java.util.Collection<?> c)
- 
- Specified by:
- removeAllin interface- java.util.Collection<E>
- Specified by:
- removeAllin interface- java.util.List<E>
- Overrides:
- removeAllin class- java.util.Vector<E>
 
- 
 
removeAllElements
public void removeAllElements()
- 
- Overrides:
- removeAllElementsin class- java.util.Vector<E>
 
- 
 
removeElement
public boolean removeElement(java.lang.Object o)
- 
- Overrides:
- removeElementin class- java.util.Vector<E>
 
- 
 
removeElementAt
public void removeElementAt(int index)
- 
- Overrides:
- removeElementAtin class- java.util.Vector<E>
 
- 
 
removeRange
public void removeRange(int fromIndex,
                        int toIndex)
- 
- Overrides:
- removeRangein class- java.util.Vector<E>
 
- 
 
retainAll
public boolean retainAll(java.util.Collection<?> c)
- 
- Specified by:
- retainAllin interface- java.util.Collection<E>
- Specified by:
- retainAllin interface- java.util.List<E>
- Overrides:
- retainAllin class- java.util.Vector<E>
 
- 
 
set
public E set(int index,
             E o)
- 
- Specified by:
- setin interface- java.util.List<E>
- Overrides:
- setin class- java.util.Vector<E>
 
- 
 
setElementAt
public void setElementAt(E o,
                         int index)
- 
- Overrides:
- setElementAtin class- java.util.Vector<E>
 
-