public class ArraySet<T>
extends java.lang.Object
implements java.util.Set<T>
| Constructor and Description |
|---|
ArraySet(java.lang.Class<T> clazz) |
ArraySet(java.lang.Class<T> clazz,
boolean replaceElementIfEquals) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ArraySet<T> source)
Add all the elements from the source ArraySet.
|
boolean |
add(T element) |
boolean |
addAll(java.util.Collection<? extends T> collection) |
boolean |
addAll(T... elements)
Add the element(s) to the set.
|
void |
clear()
Remove all the set elements.
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> collection) |
T[] |
getArray()
Get the underlying array.
|
T[] |
getArrayCopy()
Get the copy of the underlying array.
|
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
T[] |
obtainArrayCopy()
Get the copy of the underlying array.
|
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> collection) |
boolean |
removeAll(java.lang.Object... elements)
Remove element(s) from the set.
|
boolean |
retainAll(java.util.Collection<?> collection) |
int |
size() |
java.lang.Object[] |
toArray() |
<K> K[] |
toArray(K[] a) |
public ArraySet(java.lang.Class<T> clazz)
public ArraySet(java.lang.Class<T> clazz, boolean replaceElementIfEquals)
public final boolean addAll(T... elements)
elements - the elements to add.public boolean addAll(java.util.Collection<? extends T> collection)
public final boolean add(ArraySet<T> source)
source - the elements to add.public final boolean removeAll(java.lang.Object... elements)
elements - the element(s) to remove.public final T[] getArray()
add(Object) and remove(Object) instead.public final T[] getArrayCopy()
public final T[] obtainArrayCopy()
public void clear()
public int size()
public boolean isEmpty()
public boolean add(T element)
public boolean contains(java.lang.Object o)
public java.lang.Object[] toArray()
public <K> K[] toArray(K[] a)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> collection)
public boolean retainAll(java.util.Collection<?> collection)
public boolean removeAll(java.util.Collection<?> collection)
Copyright © 2013 Oracle Corporation. All Rights Reserved.