E - the element typepublic class ArrayUnenforcedSet<E>
extends java.util.ArrayList<E>
implements java.util.Set<E>
Note that for equals/hashCode, the class implements the Set behavior (unordered), not the list behavior (ordered); the fact that it subclasses ArrayList should be considered an implementation detail.
| Constructor and Description |
|---|
ArrayUnenforcedSet()
Constructs a new empty set
|
ArrayUnenforcedSet(java.util.Collection<? extends E> c)
Constructs a set containing the elements of the specified collection.
|
ArrayUnenforcedSet(int n)
Constructs an empty set with the specified initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitpublic ArrayUnenforcedSet()
public ArrayUnenforcedSet(java.util.Collection<? extends E> c)
c - the collection whose elements are to be placed into this setjava.lang.NullPointerException - if the specified collection is nullpublic ArrayUnenforcedSet(int n)
n - the initial capacity of the setjava.lang.IllegalArgumentException - if the specified initial capacity is negativeCopyright © 2019. All Rights Reserved.