final class JdkBackedImmutableMap<K,V> extends ImmutableMap<K,V>
ImmutableMap.Builder<K,V>, ImmutableMap.IteratorBasedImmutableMap<K,V>, ImmutableMap.SerializedForm<K,V>
Modifier and Type | Field and Description |
---|---|
private java.util.Map<K,V> |
delegateMap |
private ImmutableList<java.util.Map.Entry<K,V>> |
entries |
EMPTY_ENTRY_ARRAY
Constructor and Description |
---|
JdkBackedImmutableMap(java.util.Map<K,V> delegateMap,
ImmutableList<java.util.Map.Entry<K,V>> entries) |
Modifier and Type | Method and Description |
---|---|
(package private) static <K,V> ImmutableMap<K,V> |
create(int n,
java.util.Map.Entry<K,V>[] entryArray)
Creates an
ImmutableMap backed by a JDK HashMap. |
(package private) ImmutableSet<java.util.Map.Entry<K,V>> |
createEntrySet() |
(package private) ImmutableSet<K> |
createKeySet() |
(package private) ImmutableCollection<V> |
createValues() |
void |
forEach(java.util.function.BiConsumer<? super K,? super V> action) |
V |
get(java.lang.Object key) |
(package private) boolean |
isPartialView() |
int |
size() |
asMultimap, builder, builderWithExpectedSize, checkNoConflict, clear, compute, computeIfAbsent, computeIfPresent, conflictException, containsKey, containsValue, copyOf, copyOf, entryOf, entrySet, equals, getOrDefault, hashCode, isEmpty, isHashCodeFast, keyIterator, keySet, keySpliterator, merge, of, of, of, of, of, of, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, toImmutableMap, toImmutableMap, toString, values, writeReplace
private final transient ImmutableList<java.util.Map.Entry<K,V>> entries
JdkBackedImmutableMap(java.util.Map<K,V> delegateMap, ImmutableList<java.util.Map.Entry<K,V>> entries)
static <K,V> ImmutableMap<K,V> create(int n, java.util.Map.Entry<K,V>[] entryArray)
ImmutableMap
backed by a JDK HashMap. Used when probable hash flooding is
detected. This implementation may replace the entries in entryArray with its own entry objects
(though they will have the same key/value contents), and will take ownership of entryArray.public int size()
public V get(java.lang.Object key)
ImmutableSet<java.util.Map.Entry<K,V>> createEntrySet()
createEntrySet
in class ImmutableMap<K,V>
ImmutableSet<K> createKeySet()
createKeySet
in class ImmutableMap<K,V>
ImmutableCollection<V> createValues()
createValues
in class ImmutableMap<K,V>
boolean isPartialView()
isPartialView
in class ImmutableMap<K,V>