public class DeltaMap<K,V>
extends java.util.AbstractMap<K,V>
| Constructor and Description |
|---|
DeltaMap(java.util.Map<K,V> originalMap) |
DeltaMap(java.util.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(java.lang.Object key)
This is more expensive.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
This is cheap.
|
V |
get(java.lang.Object key)
This may cost twice what it would in the original Map.
|
static void |
main(java.lang.String[] args)
For testing only.
|
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(java.lang.Object key) |
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuespublic DeltaMap(java.util.Map<K,V> originalMap, MapFactory<K,V> mf)
originalMap - will serve as the basis for this DeltaMappublic boolean containsKey(java.lang.Object key)
public V get(java.lang.Object key)
public V put(K key, V value)
put in interface java.util.Map<K,V>put in class java.util.AbstractMap<K,V>key - key with which the specified value is to be associated.value - value to be associated with the specified key.public V remove(java.lang.Object key)
public void clear()
public static void main(java.lang.String[] args)
args - from command line