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.
Modifier and Type | Field and Description |
---|---|
private static final long | |
private final HashSet |
Access | Constructor and Description |
---|---|
public | |
public | |
public | |
public |
Modifier and Type | Method and Description |
---|---|
public synchronized boolean | add(E
element to be appended to this Vector o)Overrides java. Implements java. |
public void | add(int
index at which the specified element is to be inserted index, E element to be inserted o)Overrides java. Implements java. |
public synchronized boolean | addAll(Collection<? extends E>
elements to be inserted into this Vector c)Overrides java. Implements java. |
public synchronized boolean | addAll(int
index at which to insert the first element from the
specified collection index, Collection<? extends E> elements to be inserted into this Vector c)Overrides java. Implements java. |
public synchronized void | addElement(E
the component to be added o)Overrides java. |
public synchronized void | clear()
Overrides java. Implements java. |
public Object | |
public synchronized boolean | contains(Object
element whose presence in this vector is to be tested o)Overrides java. Implements java. true if this vector contains the specified element.
|
public synchronized boolean | containsAll(Collection<?>
a collection whose elements will be tested for containment
in this Vector c)Overrides java. Implements java. |
private synchronized void | |
private synchronized boolean | |
public void | insertElementAt(E
the component to insert o, int where to insert the new component index)Overrides java. index .
|
public synchronized E | remove(int
the index of the element to be removed index)Overrides java. Implements java. |
public boolean | remove(Object
element to be removed from this Vector, if present o)Overrides java. Implements java. |
public synchronized boolean | removeAll(Collection<?>
a collection of elements to be removed from the Vector c)Overrides java. Implements java. |
public synchronized void | removeAllElements()
Overrides java. |
public boolean | removeElement(Object
the component to be removed o)Overrides java. |
public synchronized void | removeElementAt(int
the index of the object to remove index)Overrides java. |
public synchronized void | removeRange(final int
index of first element to be removed fromIndex, int index after last element to be removed toIndex)Overrides java. fromIndex , inclusive, and toIndex , exclusive.
|
public synchronized boolean | retainAll(Collection<?>
a collection of elements to be retained in this Vector
(all other elements are removed) c)Overrides java. Implements java. |
public synchronized E | set(int
index of the element to replace index, E element to be stored at the specified position o)Overrides java. Implements java. |
public void | setElementAt(E
what the component is to be set to o, int the specified index index)Overrides java. index of this
vector to be the specified object.
|
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID |
set | back to summary |
---|---|
private final HashSet<E> set |
VectorSet | back to summary |
---|---|
public VectorSet() |
VectorSet | back to summary |
---|---|
public VectorSet(int initialCapacity) |
VectorSet | back to summary |
---|---|
public VectorSet(int initialCapacity, int capacityIncrement) |
VectorSet | back to summary |
---|---|
public VectorSet(Collection<? extends E> c) |
add | back to summary |
---|---|
public synchronized boolean add(E o) Overrides java. Implements java. Doc from java. Appends the specified element to the end of this Vector.
|
add | back to summary |
---|---|
public void add(int index, E o) Overrides java. Implements java. This implementation may not add the element at the given index if it is already contained in the collection.
|
addAll | back to summary |
---|---|
public synchronized boolean addAll(Collection<? extends E> c) Overrides java. Implements java. Doc from java. Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this Vector, and this Vector is nonempty.)
|
addAll | back to summary |
---|---|
public synchronized boolean addAll(int index, Collection<? extends E> c) Overrides java. Implements java. This implementation may not add all elements at the given index if any of them are already contained in the collection.
|
addElement | back to summary |
---|---|
public synchronized void addElement(E o) Overrides java. Doc from java. Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity. This method is identical in functionality to the
|
clear | back to summary |
---|---|
public synchronized void clear() Overrides java. Implements java. Doc from java. Removes all of the elements from this Vector. The Vector will be empty after this call returns (unless it throws an exception).
|
clone | back to summary |
---|---|
public Object clone() Overrides java. Doc from java. Returns a clone of this vector. The copy will contain a
reference to a clone of the internal data array, not a reference
to the original internal data array of this |
contains | back to summary |
---|---|
public synchronized boolean contains(Object o) Overrides java. Implements java. Doc from java. Returns |
containsAll | back to summary |
---|---|
public synchronized boolean containsAll(Collection<?> c) Overrides java. Implements java. Doc from java. Returns true if this Vector contains all of the elements in the specified Collection.
|
doAdd | back to summary |
---|---|
private synchronized void doAdd(int index, E o) |
doRemove | back to summary |
---|---|
private synchronized boolean doRemove(Object o) |
insertElementAt | back to summary |
---|---|
public void insertElementAt(E o, int index) Overrides java. Doc from java. Inserts the specified object as a component in this vector at the
specified The index must be a value greater than or equal to This method is identical in functionality to the
|
remove | back to summary |
---|---|
public synchronized E remove(int index) Overrides java. Implements java. Doc from java. Removes the element at the specified position in this Vector. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the Vector.
|
remove | back to summary |
---|---|
public boolean remove(Object o) Overrides java. Implements java. Doc from java. Removes the first occurrence of the specified element in this Vector
If the Vector does not contain the element, it is unchanged. More
formally, removes the element with the lowest index i such that
|
removeAll | back to summary |
---|---|
public synchronized boolean removeAll(Collection<?> c) Overrides java. Implements java. Doc from java. Removes from this Vector all of its elements that are contained in the specified Collection.
|
removeAllElements | back to summary |
---|---|
public synchronized void removeAllElements() Overrides java. Doc from java. Removes all components from this vector and sets its size to zero. This method is identical in functionality to the
|
removeElement | back to summary |
---|---|
public boolean removeElement(Object o) Overrides java. Doc from java. Removes the first (lowest-indexed) occurrence of the argument from this vector. If the object is found in this vector, each component in the vector with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously. This method is identical in functionality to the
|
removeElementAt | back to summary |
---|---|
public synchronized void removeElementAt(int index) Overrides java. Doc from java. Deletes the component at the specified index. Each component in
this vector with an index greater or equal to the specified
The index must be a value greater than or equal to This method is identical in functionality to the
|
removeRange | back to summary |
---|---|
public synchronized void removeRange(final int fromIndex, int toIndex) Overrides java. Doc from java. Removes from this list all of the elements whose index is between
|
retainAll | back to summary |
---|---|
public synchronized boolean retainAll(Collection<?> c) Overrides java. Implements java. Doc from java. Retains only the elements in this Vector that are contained in the specified Collection. In other words, removes from this Vector all of its elements that are not contained in the specified Collection.
|
set | back to summary |
---|---|
public synchronized E set(int index, E o) Overrides java. Implements java. Doc from java. Replaces the element at the specified position in this Vector with the specified element.
|
setElementAt | back to summary |
---|---|
public void setElementAt(E o, int index) Overrides java. Doc from java. Sets the component at the specified The index must be a value greater than or equal to This method is identical in functionality to the
|