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 thereforeADDEDandREMOVEDcombined are a no-op. Obviously this does not apply to different property values were the combination ofADDEDandREMOVEDisCHANGED.- Author:
- Ulrich Kreher
-
-
Field Summary
Fields Modifier and Type Field Description static ChangeCombinerDIFFERENT_CHANGESThe changes are different and therefore most combinations of changes lead toCHANGED.static ChangeCombinerEQUAL_CHANGESThe changes are equal, for instanceADDEDandREMOVEDas well asREMOVEDandADDEDare no-ops.static longserialVersionUIDGenerated ID for serialisation.static ChangeCombinerSIMILAR_CHANGESThe changes are similar, for instanceADDEDandREMOVEDis a no-op butREMOVEDandADDEDisCHANGED.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeTypecombineChanges(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 instanceADDEDandREMOVEDas well asREMOVEDandADDEDare no-ops.
-
SIMILAR_CHANGES
static final ChangeCombiner SIMILAR_CHANGES
The changes are similar, for instanceADDEDandREMOVEDis a no-op butREMOVEDandADDEDisCHANGED.
-
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.nullis treated asNONE.type2- The second change to combine.nullis treated asNONE.- Returns:
- The combination of the two changes relative to a property.
-
-