public final class PackedMap<K,V> extends AbstractMap<K,V>
HashMap
/TreeMap
.
The implementation is backed by a single exact-length array, so this implementation has the following performance characteristics.
Modifier and Type | Class and Description |
---|---|
static class |
PackedMap.ConverterImpl
Should persist like a regular map.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
static <K,V> PackedMap<K,V> |
of(Map<? extends K,? extends V> src) |
Collection<V> |
values() |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public static <K,V> PackedMap<K,V> of(Map<? extends K,? extends V> src)
src
- Map to copy contents from. Iteration order is preserved.public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public Collection<V> values()
Copyright © 2004–2021. All rights reserved.