@Deprecated
public class ArraySet<E>
extends java.lang.Object
implements java.util.Set<E>
Constructor and Description |
---|
ArraySet()
Deprecated.
|
ArraySet(java.util.Collection<? extends E> set)
Deprecated.
|
ArraySet(int capacity)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E value)
Deprecated.
|
boolean |
addAll(java.util.Collection<? extends E> collection)
Deprecated.
|
void |
clear()
Deprecated.
|
void |
clearAndAddAll(ArraySet<? extends E> collection)
Deprecated.
Equivalent to calling
clear() followed by addAll(Collection) , but this should
make it more apparent that this is an optimized code path. |
boolean |
contains(java.lang.Object value)
Deprecated.
|
boolean |
containsAll(java.util.Collection<?> collection)
Deprecated.
|
void |
ensureCapacity(int minimumCapacity)
Deprecated.
|
boolean |
equals(java.lang.Object object)
Deprecated.
|
int |
hashCode()
Deprecated.
|
int |
indexOf(E value)
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
java.util.Iterator<E> |
iterator()
Deprecated.
|
boolean |
remove(java.lang.Object value)
Deprecated.
|
boolean |
removeAll(java.util.Collection<?> collection)
Deprecated.
|
E |
removeAt(int index)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> collection)
Deprecated.
|
int |
size()
Deprecated.
|
java.lang.Object[] |
toArray()
Deprecated.
|
<T> T[] |
toArray(T[] array)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
E |
valueAt(int index)
Deprecated.
|
public ArraySet()
public ArraySet(int capacity)
public ArraySet(java.util.Collection<? extends E> set)
public boolean add(E value)
public boolean addAll(java.util.Collection<? extends E> collection)
public void clear()
public void clearAndAddAll(ArraySet<? extends E> collection)
clear()
followed by addAll(Collection)
, but this should
make it more apparent that this is an optimized code path. Instead of needing lots of O(log2 N)
operations, this special case is optimized to perform in O(N) time, where N is the size of the
incoming collection.public boolean contains(java.lang.Object value)
public boolean containsAll(java.util.Collection<?> collection)
public void ensureCapacity(int minimumCapacity)
public boolean equals(java.lang.Object object)
public int hashCode()
public int indexOf(E value)
public boolean isEmpty()
public java.util.Iterator<E> iterator()
public boolean remove(java.lang.Object value)
public boolean removeAll(java.util.Collection<?> collection)
public E removeAt(int index)
public boolean retainAll(java.util.Collection<?> collection)
public int size()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] array)
public java.lang.String toString()
toString
in class java.lang.Object
public E valueAt(int index)