T - the type of elementspublic abstract class ImmutableSet<T> extends AbstractSet<T>
These strategies include:
| Modifier and Type | Class and Description |
|---|---|
static interface |
ImmutableSet.Builder<T>
Builder for building immutable sets.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
static <T> ImmutableSet.Builder<T> |
builder()
Creates a new empty builder for building immutable sets.
|
void |
clear() |
static <T> org.jboss.weld.util.collections.ImmutableSet.ImmutableSetCollector<T> |
collector()
Returns a collector that can be used to collect items of a stream into an immutable set.
|
boolean |
containsAll(Collection<?> c) |
static <T> Set<T> |
copyOf(Collection<? extends T> collection)
Creates a new immutable set that consists of the elements in the given collection.
|
boolean |
equals(Object obj) |
boolean |
isEmpty() |
static <T> Set<T> |
of(T... elements)
Creates a new immutable set that consists of given elements.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
Spliterator<T> |
spliterator() |
hashCodecontains, iterator, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, removeIf, streampublic static <T> Set<T> copyOf(Collection<? extends T> collection)
ImmutableSet, the instance is re-used.collection - the given collection@SafeVarargs public static <T> Set<T> of(T... elements)
elements - the given elementspublic static <T> org.jboss.weld.util.collections.ImmutableSet.ImmutableSetCollector<T> collector()
public static <T> ImmutableSet.Builder<T> builder()
public boolean add(T e)
add in interface Collection<T>add in interface Set<T>add in class AbstractCollection<T>public boolean remove(Object o)
remove in interface Collection<T>remove in interface Set<T>remove in class AbstractCollection<T>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T>addAll in interface Set<T>addAll in class AbstractCollection<T>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>retainAll in interface Set<T>retainAll in class AbstractCollection<T>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>removeAll in interface Set<T>removeAll in class AbstractSet<T>public void clear()
clear in interface Collection<T>clear in interface Set<T>clear in class AbstractCollection<T>public boolean isEmpty()
isEmpty in interface Collection<T>isEmpty in interface Set<T>isEmpty in class AbstractCollection<T>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface Set<T>containsAll in class AbstractCollection<T>public boolean equals(Object obj)
equals in interface Collection<T>equals in interface Set<T>equals in class AbstractSet<T>public Spliterator<T> spliterator()
spliterator in interface Iterable<T>spliterator in interface Collection<T>spliterator in interface Set<T>Copyright © 2017. All rights reserved.