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 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 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 instance ADDED and REMOVED as well as REMOVED and ADDED are no-ops.
      • SIMILAR_CHANGES

        static final ChangeCombiner SIMILAR_CHANGES
        The changes are similar, for instance ADDED and REMOVED is a no-op but REMOVED and ADDED is CHANGED.
      • DIFFERENT_CHANGES

        static final ChangeCombiner DIFFERENT_CHANGES
        The changes are different and therefore most combinations of changes lead to CHANGED.
    • 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 as NONE.
        type2 - The second change to combine. null is treated as NONE.
        Returns:
        The combination of the two changes relative to a property.