Package de.xima.fc.workflow.model
Class MapDiff<K,V>
- java.lang.Object
- 
- de.xima.fc.workflow.model.MapDiff<K,V>
 
- 
- Type Parameters:
- K- Type of the map's keys.
- V- Type of the map's values.
 - All Implemented Interfaces:
- IMapDiff<K,V>,- Serializable
 
 public class MapDiff<K,V> extends Object implements IMapDiff<K,V> - Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface de.xima.fc.interfaces.IMapDiffIMapDiff.IModifiedValue<V>
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyBackward(Map<K,V> map)Applies the diff represented by this instance to the given map.voidapplyForward(Map<K,V> map)Applies the diff represented by this instance to the given map.static <K,V>
 IMapDiff<K,V>betweenMaps(Map<K,V> oldMap, Map<K,V> newMap)Computes and returns the difference between twoMaps.static IMapDiff<String,Serializable>empty()booleanequals(Object obj)Map<K,V>getAddedEntries()Map<K,IMapDiff.IModifiedValue<V>>getModifiedEntries()Map<K,V>getRemovedEntries()inthashCode()
 
- 
- 
- 
Method Detail- 
applyBackwardpublic void applyBackward(Map<K,V> map) Description copied from interface:IMapDiffApplies the diff represented by this instance to the given map. If this is called on the map new map used to create the diff, this method turns it into the old map.- Specified by:
- applyBackwardin interface- IMapDiff<K,V>
- Parameters:
- map- Map to modify.
 
 - 
applyForwardpublic void applyForward(Map<K,V> map) Description copied from interface:IMapDiffApplies the diff represented by this instance to the given map. If this is called on the map old map used to create the diff, this method turns it into the new map.- Specified by:
- applyForwardin interface- IMapDiff<K,V>
- Parameters:
- map- Map to modify.
 
 - 
getAddedEntriespublic Map<K,V> getAddedEntries() - Specified by:
- getAddedEntriesin interface- IMapDiff<K,V>
- Returns:
- A map with the keys of the newly added entries, and the new value for each key.
 
 - 
getModifiedEntriespublic Map<K,IMapDiff.IModifiedValue<V>> getModifiedEntries() - Specified by:
- getModifiedEntriesin interface- IMapDiff<K,V>
- Returns:
- A map with the keys of the modified entries, together with the old and new value for each key.
 
 - 
getRemovedEntriespublic Map<K,V> getRemovedEntries() - Specified by:
- getRemovedEntriesin interface- IMapDiff<K,V>
- Returns:
- A map with the keys of the removed entries, and the old value for each key.
 
 - 
betweenMapspublic static <K,V> IMapDiff<K,V> betweenMaps(Map<K,V> oldMap, Map<K,V> newMap) Computes and returns the difference between twoMaps.- Type Parameters:
- K- Type of the map's keys.
- V- Type of the map's values.
- Parameters:
- oldMap- Previous map.
- newMap- New map.
- Returns:
- The diff between the two maps.
 
 - 
emptypublic static IMapDiff<String,Serializable> empty() - Returns:
- A diff with no entries (no added, removed, or modified entries).
 
 
- 
 
-