public class DeltaMap<K,V> extends AbstractMap<K,V>
AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
DeltaMap(Map<K,V> originalMap) |
DeltaMap(Map<K,V> originalMap,
MapFactory<K,V> mf)
This is very cheap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
This is more expensive than normal.
|
boolean |
containsKey(Object key)
This is more expensive.
|
Set<Map.Entry<K,V>> |
entrySet()
This is cheap.
|
V |
get(Object key)
This may cost twice what it would in the original Map.
|
V |
put(K key,
V value)
This may cost twice what it would in the original Map because we have to find
the original value for this key.
|
V |
remove(Object key) |
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic DeltaMap(Map<K,V> originalMap, MapFactory<K,V> mf)
originalMap - will serve as the basis for this DeltaMappublic boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>key - key whose presence in this map is to be tested.public V put(K key, V value)
put in interface Map<K,V>put in class AbstractMap<K,V>key - key with which the specified value is to be associated.value - value to be associated with the specified key.public void clear()