public final class FastImmutableArraySet<T> extends AbstractSet<T>
HashSet
so it is worth copying the contents of the set to an array when iterating over it
hundreds of times.Constructor and Description |
---|
FastImmutableArraySet(T[] contents) |
Modifier and Type | Method and Description |
---|---|
Iterator<T> |
iterator()
Returns an iterator over the elements contained in this collection.
|
int |
size()
Returns the number of elements in this collection.
|
equals, hashCode, removeAll
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public FastImmutableArraySet(T[] contents)
public Iterator<T> iterator()
AbstractCollection
public int size()
Collection
size
in interface Collection<T>
size
in interface Set<T>
size
in class AbstractCollection<T>