Package org.apache.tools.ant.util
Class VectorSet<E>
- java.lang.Object
- 
- java.util.AbstractCollection<E>
- 
- java.util.AbstractList<E>
- 
- java.util.Vector<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 DirectoryScannerprohibited 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
 
- 
- 
Method SummaryModifier and Type Method Description voidadd(int index, E o)This implementation may not add the element at the given index if it is already contained in the collection.booleanadd(E o)booleanaddAll(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.booleanaddAll(java.util.Collection<? extends E> c)voidaddElement(E o)voidclear()java.lang.Objectclone()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)voidinsertElementAt(E o, int index)Eremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)voidremoveAllElements()booleanremoveElement(java.lang.Object o)voidremoveElementAt(int index)voidremoveRange(int fromIndex, int toIndex)booleanretainAll(java.util.Collection<?> c)Eset(int index, E o)voidsetElementAt(E o, int index)- 
Methods inherited from class java.util.Vectorcapacity, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
 
- 
 
- 
- 
- 
Constructor Detail- 
VectorSetpublic VectorSet() 
 - 
VectorSetpublic VectorSet(int initialCapacity) 
 - 
VectorSetpublic VectorSet(int initialCapacity, int capacityIncrement)
 - 
VectorSetpublic VectorSet(java.util.Collection<? extends E> c) 
 
- 
 - 
Method Detail- 
addpublic boolean add(E o) 
 - 
addpublic 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.
 - 
addAllpublic boolean addAll(java.util.Collection<? extends E> c) 
 - 
addAllpublic 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.
 - 
clearpublic void clear() 
 - 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- java.util.Vector<E>
 
 - 
containspublic boolean contains(java.lang.Object o) 
 - 
containsAllpublic boolean containsAll(java.util.Collection<?> c) 
 - 
insertElementAtpublic void insertElementAt(E o, int index) - Overrides:
- insertElementAtin class- java.util.Vector<E>
 
 - 
removepublic E remove(int index) 
 - 
removepublic boolean remove(java.lang.Object o) 
 - 
removeAllpublic boolean removeAll(java.util.Collection<?> c) 
 - 
removeAllElementspublic void removeAllElements() - Overrides:
- removeAllElementsin class- java.util.Vector<E>
 
 - 
removeElementpublic boolean removeElement(java.lang.Object o) - Overrides:
- removeElementin class- java.util.Vector<E>
 
 - 
removeElementAtpublic void removeElementAt(int index) - Overrides:
- removeElementAtin class- java.util.Vector<E>
 
 - 
removeRangepublic void removeRange(int fromIndex, int toIndex)- Overrides:
- removeRangein class- java.util.Vector<E>
 
 - 
retainAllpublic boolean retainAll(java.util.Collection<?> c) 
 
- 
 
-