@Deprecated public class ArraySet<E> extends Object implements Set<E>
Constructor and Description |
---|
ArraySet()
Deprecated.
|
ArraySet(Collection<? extends E> set)
Deprecated.
|
ArraySet(int capacity)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E value)
Deprecated.
|
boolean |
addAll(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(Object value)
Deprecated.
|
boolean |
containsAll(Collection<?> collection)
Deprecated.
|
void |
ensureCapacity(int minimumCapacity)
Deprecated.
|
boolean |
equals(Object object)
Deprecated.
|
int |
hashCode()
Deprecated.
|
int |
indexOf(E value)
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
Iterator<E> |
iterator()
Deprecated.
|
boolean |
remove(Object value)
Deprecated.
|
boolean |
removeAll(Collection<?> collection)
Deprecated.
|
E |
removeAt(int index)
Deprecated.
|
boolean |
retainAll(Collection<?> collection)
Deprecated.
|
int |
size()
Deprecated.
|
Object[] |
toArray()
Deprecated.
|
<T> T[] |
toArray(T[] array)
Deprecated.
|
String |
toString()
Deprecated.
|
E |
valueAt(int index)
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
public ArraySet()
public ArraySet(int capacity)
public ArraySet(Collection<? extends E> set)
public boolean add(E value)
public boolean addAll(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(Object value)
public boolean containsAll(Collection<?> collection)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
public void ensureCapacity(int minimumCapacity)
public boolean equals(Object object)
public int hashCode()
public int indexOf(E value)
public boolean isEmpty()
public boolean remove(Object value)
public boolean removeAll(Collection<?> collection)
public E removeAt(int index)
public boolean retainAll(Collection<?> collection)
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] array)
public E valueAt(int index)