| Constructor and Description |
|---|
MapDiff() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(java.util.Map<? super K,? super V> map)
Applies the changes in this diff to the given map
|
abstract java.util.Set<K> |
getAddedKeys() |
abstract java.util.Set<K> |
getChangedKeys() |
abstract V |
getNewValue(java.lang.Object key)
Returns the new value for the given key, which must be an element of
getChangedKeys() or getAddedKeys(). |
abstract V |
getOldValue(java.lang.Object key)
Returns the old value for the given key, which must be an element of
getRemovedKeys() or getChangedKeys(). |
abstract java.util.Set<K> |
getRemovedKeys() |
boolean |
isEmpty()
Returns true if the diff has no added, removed or changed entries.
|
java.util.Map<K,V> |
simulateOn(java.util.Map<K,V> map)
Returns a map showing what
map would look like if this diff
were applied to it. |
public boolean isEmpty()
public void applyTo(java.util.Map<? super K,? super V> map)
map - the map to which the diff will be appliedpublic java.util.Map<K,V> simulateOn(java.util.Map<K,V> map)
map would look like if this diff
were applied to it.
Note: the returned map is only valid until structural changes are made to the passed-in map.
map - the map over which the diff will be simulatedmap would look like
if it were passed to the applyTo(Map) method.applyTo(Map)public abstract java.util.Set<K> getAddedKeys()
public abstract java.util.Set<K> getRemovedKeys()
public abstract java.util.Set<K> getChangedKeys()
public abstract V getOldValue(java.lang.Object key)
getRemovedKeys() or getChangedKeys().key - public abstract V getNewValue(java.lang.Object key)
getChangedKeys() or getAddedKeys().key -
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.