public class MutableMap<K,V>
extends java.util.LinkedHashMap<K,V>
Modifier and Type | Class and Description |
---|---|
static class |
MutableMap.Builder<K,V> |
Constructor and Description |
---|
MutableMap() |
MutableMap(java.util.Map source) |
Modifier and Type | Method and Description |
---|---|
MutableMap<K,V> |
add(K key,
V value)
as
HashMap.put(Object, Object) but fluent style |
MutableMap<K,V> |
add(java.util.Map<? extends K,? extends V> m)
as
HashMap.putAll(Map) but fluent style (and accepting null, ignoring it) |
MutableMap<K,V> |
addIfNotNull(K key,
V value)
as
HashMap.put(Object, Object) but excluding null values, and fluent style |
java.util.Map<K,V> |
asImmutableCopy()
|
java.util.Map<K,V> |
asUnmodifiable()
|
java.util.Map<K,V> |
asUnmodifiableCopy()
|
static <K,V> MutableMap.Builder<K,V> |
builder() |
static <K,V> MutableMap<K,V> |
copyOf(java.util.Map<? extends K,? extends V> orig) |
Maybe<V> |
getMaybe(K key) |
static <K,V> MutableMap<K,V> |
of() |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1) |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1,
K k2,
V v2) |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3) |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4) |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5) |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6) |
static <K,V> MutableMap<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7) |
com.google.common.collect.ImmutableMap<K,V> |
toImmutable()
Deprecated.
|
public MutableMap()
public MutableMap(java.util.Map source)
public static <K,V> MutableMap<K,V> of()
public static <K,V> MutableMap<K,V> of(K k1, V v1)
public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2)
public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
public static <K,V> MutableMap<K,V> copyOf(@Nullable java.util.Map<? extends K,? extends V> orig)
public MutableMap<K,V> add(K key, V value)
HashMap.put(Object, Object)
but fluent stylepublic MutableMap<K,V> add(@Nullable java.util.Map<? extends K,? extends V> m)
HashMap.putAll(Map)
but fluent style (and accepting null, ignoring it)public MutableMap<K,V> addIfNotNull(K key, V value)
HashMap.put(Object, Object)
but excluding null values, and fluent stylepublic static <K,V> MutableMap.Builder<K,V> builder()