T - The type of the property values that are changed.public class ChangeTrackingMap<T extends java.io.Serializable> extends java.util.HashMap<T,ChangeType>
HashMap by the means to track and
combine changes for property values. Depending on the type of property value
(and therefore the used ChangeCombiner), several changes of the
same property value are combined to form one change.| Modifier and Type | Field and Description |
|---|---|
protected ChangeCombiner |
changeCombiner
The change combiner used for combining several changes to a property value.
|
| Constructor and Description |
|---|
ChangeTrackingMap(ChangeCombiner changeCombiner)
Creates a new
ChangeTrackingMap with the designated change
combiner. |
ChangeTrackingMap(ChangeCombiner changeCombiner,
int initialCapacity)
Creates a new
ChangeTrackingMap with the designated change
combiner and the designated initial capacity. |
ChangeTrackingMap(ChangeCombiner changeCombiner,
java.util.Map<? extends T,ChangeType> m)
Creates a new
ChangeTrackingMap with the designated change
combiner containing the content of the designated map. |
| Modifier and Type | Method and Description |
|---|---|
ChangeType |
change(T propertyValue,
ChangeType changeType)
Tracks a change of the designated type for the designated property value
and combines the change with an existing one.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesprotected final ChangeCombiner changeCombiner
public ChangeTrackingMap(ChangeCombiner changeCombiner)
ChangeTrackingMap with the designated change
combiner.changeCombiner - The change combiner used for combining several
changes to a property value.public ChangeTrackingMap(ChangeCombiner changeCombiner, int initialCapacity)
ChangeTrackingMap with the designated change
combiner and the designated initial capacity.changeCombiner - The change combiner used for combining several
changes to a property value.initialCapacity - The initial capacity for the HashMap.public ChangeTrackingMap(ChangeCombiner changeCombiner, java.util.Map<? extends T,ChangeType> m)
ChangeTrackingMap with the designated change
combiner containing the content of the designated map.changeCombiner - The change combiner used for combining several
changes to a property value.m - The map of which the mappings are to be placed in this map.public ChangeType change(T propertyValue, ChangeType changeType)
propertyValue - The value of the property that has changed.changeType - The type of the change of the property.