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:
- Serializable,- Cloneable,- Iterable<E>,- Collection<E>,- List<E>,- RandomAccess
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:
- 
Field SummaryFields inherited from class java.util.VectorcapacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractListmodCount
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidThis implementation may not add the element at the given index if it is already contained in the collection.booleanbooleanaddAll(int index, 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(Collection<? extends E> c) voidaddElement(E o) voidclear()clone()booleanbooleancontainsAll(Collection<?> c) voidinsertElementAt(E o, int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) voidbooleanvoidremoveElementAt(int index) voidremoveRange(int fromIndex, int toIndex) booleanretainAll(Collection<?> c) 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, trimToSizeMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, stream, toArray
- 
Constructor Details- 
VectorSetpublic VectorSet()
- 
VectorSetpublic VectorSet(int initialCapacity) 
- 
VectorSetpublic VectorSet(int initialCapacity, int capacityIncrement) 
- 
VectorSet
 
- 
- 
Method Details- 
add
- 
addThis implementation may not add the element at the given index if it is already contained in the collection.
- 
addElement- Overrides:
- addElementin class- Vector<E>
 
- 
addAll
- 
addAllThis implementation may not add all elements at the given index if any of them are already contained in the collection.
- 
clearpublic void clear()
- 
clone
- 
contains
- 
containsAll- Specified by:
- containsAllin interface- Collection<E>
- Specified by:
- containsAllin interface- List<E>
- Overrides:
- containsAllin class- Vector<E>
 
- 
insertElementAt- Overrides:
- insertElementAtin class- Vector<E>
 
- 
remove
- 
remove
- 
removeAll
- 
removeAllElementspublic void removeAllElements()- Overrides:
- removeAllElementsin class- Vector<E>
 
- 
removeElement- Overrides:
- removeElementin class- Vector<E>
 
- 
removeElementAtpublic void removeElementAt(int index) - Overrides:
- removeElementAtin class- Vector<E>
 
- 
removeRangepublic void removeRange(int fromIndex, int toIndex) - Overrides:
- removeRangein class- Vector<E>
 
- 
retainAll
- 
set
- 
setElementAt- Overrides:
- setElementAtin class- Vector<E>
 
 
-