public final class ImmutableMapWithNullValues<K,V> extends AbstractMap<K,V>
ImmutableMap uses 16 fewer bytes per entry than TreeMap, but does not
allow null values. This wrapper class lets us have our cake and eat it too -- we use a sentinel
object in the underlying ImmutableMap and translate it on any read path.| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMapWithNullValues.Builder<K,V> |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object other) |
V |
get(Object key) |
int |
hashCode() |
String |
toString() |
Collection<V> |
values() |
clear, clone, containsKey, containsValue, isEmpty, keySet, put, putAll, remove, sizefinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Collection<V> values()
public boolean equals(Object other)
public int hashCode()
public String toString()
toString in class AbstractMap<K,V>