public final class ImmutableSet<E>
extends java.lang.Object
implements java.util.Set<E>, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableSet.Builder<E> |
Constructor and Description |
---|
ImmutableSet(java.util.Collection<E> collection) |
ImmutableSet(E... elements) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E object) |
boolean |
addAll(java.util.Collection<? extends E> collection) |
void |
clear() |
boolean |
contains(java.lang.Object object) |
boolean |
containsAll(java.util.Collection<?> collection) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection<?> collection) |
boolean |
retainAll(java.util.Collection<?> collection) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
public ImmutableSet(E... elements)
public ImmutableSet(java.util.Collection<E> collection)
public boolean add(E object)
public boolean addAll(@NonNull java.util.Collection<? extends E> collection)
public void clear()
public boolean contains(java.lang.Object object)
public boolean containsAll(@NonNull java.util.Collection<?> collection)
public boolean isEmpty()
@NonNull public java.util.Iterator<E> iterator()
public boolean remove(java.lang.Object object)
public boolean removeAll(@NonNull java.util.Collection<?> collection)
public boolean retainAll(@NonNull java.util.Collection<?> collection)
public int size()
@NonNull public java.lang.Object[] toArray()