T
- the type of elementspublic abstract class ImmutableSet<T>
extends java.util.AbstractSet<T>
These strategies include:
Set
implementation instance representing an empty listSet
implementation based on hashingModifier 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(java.util.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(java.util.Collection<?> c) |
static <T> java.util.Set<T> |
copyOf(java.util.Collection<? extends T> collection)
Creates a new immutable set that consists of the elements in the given collection.
|
boolean |
equals(java.lang.Object obj) |
boolean |
isEmpty() |
static <T> java.util.Set<T> |
of(T... elements)
Creates a new immutable set that consists of given elements.
|
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
java.util.Spliterator<T> |
spliterator() |
contains, iterator, size, toArray, toArray, toString
public static <T> java.util.Set<T> copyOf(java.util.Collection<? extends T> collection)
ImmutableSet
, the instance is re-used.collection
- the given collection@SafeVarargs public static <T> java.util.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)
public boolean remove(java.lang.Object o)
public boolean addAll(java.util.Collection<? extends T> c)
public boolean retainAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public void clear()
public boolean isEmpty()
public boolean containsAll(java.util.Collection<?> c)
public boolean equals(java.lang.Object obj)
Copyright © 2014. All Rights Reserved.