E
- the element typepublic class ArrayUnenforcedSet<E> extends ArrayList<E> implements 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.
modCount
Constructor and Description |
---|
ArrayUnenforcedSet()
Constructs a new empty set
|
ArrayUnenforcedSet(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(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, trimToSize
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray
parallelStream, removeIf, stream
containsAll
public ArrayUnenforcedSet()
public ArrayUnenforcedSet(Collection<? extends E> c)
c
- the collection whose elements are to be placed into this setNullPointerException
- if the specified collection is nullpublic ArrayUnenforcedSet(int n)
n
- the initial capacity of the setIllegalArgumentException
- if the specified initial capacity is negativepublic boolean equals(Object o)
Copyright © 2017. All rights reserved.