public class ArraySet<E>
extends java.util.AbstractSet<E>
implements java.io.Serializable
Constructor and Description |
---|
ArraySet()
Constructs an ArraySet.
|
ArraySet(E... elements)
Constructs an ArraySet with the specified elements.
|
ArraySet(int initialSize)
Constructs an ArraySet with specified initial size of backing array.
|
ArraySet(java.util.List<E> source)
Constructs an ArraySet, using the given list as the backing collection.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Adds element to set.
|
java.util.Iterator<E> |
iterator()
Returns iterator over elements of the set.
|
int |
size()
Returns size of set.
|
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public ArraySet()
public ArraySet(java.util.List<E> source)
public ArraySet(int initialSize)
initialSize
- initial size of the backing array.@SafeVarargs public ArraySet(E... elements)
elements
- the elements to be put in the set.