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 Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier 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.Vector
capacity, 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.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Constructor Details
-
VectorSet
public VectorSet() -
VectorSet
public VectorSet(int initialCapacity) -
VectorSet
public VectorSet(int initialCapacity, int capacityIncrement) -
VectorSet
-
-
Method Details
-
add
-
add
This implementation may not add the element at the given index if it is already contained in the collection. -
addElement
- Overrides:
addElementin classVector<E>
-
addAll
-
addAll
This implementation may not add all elements at the given index if any of them are already contained in the collection. -
clear
public void clear() -
clone
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>- Overrides:
containsAllin classVector<E>
-
insertElementAt
- Overrides:
insertElementAtin classVector<E>
-
remove
-
remove
-
removeAll
-
removeAllElements
public void removeAllElements()- Overrides:
removeAllElementsin classVector<E>
-
removeElement
- Overrides:
removeElementin classVector<E>
-
removeElementAt
public void removeElementAt(int index) - Overrides:
removeElementAtin classVector<E>
-
removeRange
public void removeRange(int fromIndex, int toIndex) - Overrides:
removeRangein classVector<E>
-
retainAll
-
set
-
setElementAt
- Overrides:
setElementAtin classVector<E>
-