public abstract class ImmutableMap<K,V> extends AbstractImmutableMap<K,V>
| Modifier and Type | Class and Description |
|---|---|
static interface |
ImmutableMap.Builder<K,V> |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
static <K,V> ImmutableMap.Builder<K,V> |
builder()
Creates a new empty builder for building immutable map.
|
static <K,V> Map<K,V> |
copyOf(Map<K,V> map)
Creates an immutable map.
|
static <K,V> Map<K,V> |
of(K key,
V value)
Creates an immutable singleton instance.
|
clear, isEmpty, put, putAll, removeclone, containsKey, containsValue, entrySet, equals, get, hashCode, keySet, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic static <K,V> Map<K,V> copyOf(Map<K,V> map)
map - the given mappublic static <K,V> Map<K,V> of(K key, V value)
key - value - public static <K,V> ImmutableMap.Builder<K,V> builder()
Copyright © 2017. All rights reserved.