public class MutableSet<V>
extends java.util.LinkedHashSet<V>
Modifier and Type | Class and Description |
---|---|
static class |
MutableSet.Builder<V> |
Constructor and Description |
---|
MutableSet() |
MutableSet(java.lang.Iterable<? extends V> source) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(java.lang.Iterable<? extends V> setToAdd) |
boolean |
addIfNotNull(V e) |
java.util.Set<V> |
asImmutableCopy()
|
java.util.Set<V> |
asUnmodifiable()
|
java.util.Set<V> |
asUnmodifiableCopy()
|
static <V> MutableSet.Builder<V> |
builder() |
static <V> MutableSet<V> |
copyOf(java.lang.Iterable<? extends V> orig) |
static <V> MutableSet<V> |
copyOf(java.util.Iterator<? extends V> elements) |
static <V> MutableSet<V> |
of() |
static <V> MutableSet<V> |
of(V v1) |
static <V> MutableSet<V> |
of(V v1,
V v2) |
static <V> MutableSet<V> |
of(V v1,
V v2,
V v3,
V... vMore) |
MutableSet<V> |
put(V e)
as
#add(V) but fluent style |
MutableSet<V> |
putAll(java.lang.Iterable<? extends V> setToAdd)
as
AbstractCollection.addAll(Collection) but fluent style and permitting null |
MutableSet<V> |
putIfNotNull(V e)
as
#addIfNotNull(V) but fluent style |
boolean |
removeIfNotNull(V item) |
add, clear, clone, contains, isEmpty, iterator, remove, size
addAll, containsAll, retainAll, toArray, toArray, toString
public MutableSet()
public MutableSet(java.lang.Iterable<? extends V> source)
public static <V> MutableSet<V> of()
public static <V> MutableSet<V> of(V v1)
public static <V> MutableSet<V> of(V v1, V v2)
public static <V> MutableSet<V> of(V v1, V v2, V v3, V... vMore)
public static <V> MutableSet<V> copyOf(@Nullable java.lang.Iterable<? extends V> orig)
public static <V> MutableSet<V> copyOf(@Nullable java.util.Iterator<? extends V> elements)
public java.util.Set<V> asImmutableCopy()
public java.util.Set<V> asUnmodifiable()
public java.util.Set<V> asUnmodifiableCopy()
public static <V> MutableSet.Builder<V> builder()
public boolean addIfNotNull(V e)
public boolean addAll(java.lang.Iterable<? extends V> setToAdd)
public MutableSet<V> putAll(java.lang.Iterable<? extends V> setToAdd)
AbstractCollection.addAll(Collection)
but fluent style and permitting nullpublic MutableSet<V> put(V e)
#add(V)
but fluent stylepublic MutableSet<V> putIfNotNull(V e)
#addIfNotNull(V)
but fluent stylepublic boolean removeIfNotNull(V item)