Interface ChangeCombiner
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DifferentChangeCombiner
,EqualChangeCombiner
,SimilarChangeCombiner
public interface ChangeCombiner extends Serializable
Combines two changes depending on how they relate to each other. For instance when changing the very same property value, this is an equal change and thereforeADDED
andREMOVED
combined are a no-op. Obviously this does not apply to different property values were the combination ofADDED
andREMOVED
isCHANGED
.- Author:
- Ulrich Kreher
-
-
Field Summary
Fields Modifier and Type Field Description static ChangeCombiner
DIFFERENT_CHANGES
The changes are different and therefore most combinations of changes lead toCHANGED
.static ChangeCombiner
EQUAL_CHANGES
The changes are equal, for instanceADDED
andREMOVED
as well asREMOVED
andADDED
are no-ops.static long
serialVersionUID
Generated ID for serialisation.static ChangeCombiner
SIMILAR_CHANGES
The changes are similar, for instanceADDED
andREMOVED
is a no-op butREMOVED
andADDED
isCHANGED
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeType
combineChanges(ChangeType type1, ChangeType type2)
Combines two changes, for a property.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
EQUAL_CHANGES
static final ChangeCombiner EQUAL_CHANGES
The changes are equal, for instanceADDED
andREMOVED
as well asREMOVED
andADDED
are no-ops.
-
SIMILAR_CHANGES
static final ChangeCombiner SIMILAR_CHANGES
The changes are similar, for instanceADDED
andREMOVED
is a no-op butREMOVED
andADDED
isCHANGED
.
-
DIFFERENT_CHANGES
static final ChangeCombiner DIFFERENT_CHANGES
The changes are different and therefore most combinations of changes lead toCHANGED
.
-
-
Method Detail
-
combineChanges
ChangeType combineChanges(ChangeType type1, ChangeType type2)
Combines two changes, for a property.- Parameters:
type1
- The first change to combine.null
is treated asNONE
.type2
- The second change to combine.null
is treated asNONE
.- Returns:
- The combination of the two changes relative to a property.
-
-