Interface ChangeCombiner
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DifferentChangeCombiner,EqualChangeCombiner,SimilarChangeCombiner
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 therefore
ADDED and REMOVED combined are a
no-op. Obviously this does not apply to different property values were the
combination of ADDED and REMOVED is
CHANGED.- Author:
- Ulrich Kreher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChangeCombinerThe changes are different and therefore most combinations of changes lead toCHANGED.static final ChangeCombinerThe changes are equal, for instanceADDEDandREMOVEDas well asREMOVEDandADDEDare no-ops.static final longGenerated ID for serialisation.static final ChangeCombinerThe changes are similar, for instanceADDEDandREMOVEDis a no-op butREMOVEDandADDEDisCHANGED. -
Method Summary
Modifier and TypeMethodDescriptioncombineChanges(ChangeType type1, ChangeType type2) Combines two changes, for a property.
-
Field Details
-
serialVersionUID
static final long serialVersionUIDGenerated ID for serialisation.- See Also:
-
EQUAL_CHANGES
The changes are equal, for instanceADDEDandREMOVEDas well asREMOVEDandADDEDare no-ops. -
SIMILAR_CHANGES
The changes are similar, for instanceADDEDandREMOVEDis a no-op butREMOVEDandADDEDisCHANGED. -
DIFFERENT_CHANGES
The changes are different and therefore most combinations of changes lead toCHANGED.
-
-
Method Details
-
combineChanges
Combines two changes, for a property.- Parameters:
type1- The first change to combine.nullis treated asNONE.type2- The second change to combine.nullis treated asNONE.- Returns:
- The combination of the two changes relative to a property.
-