Class SimilarChangeCombiner

  • All Implemented Interfaces:
    ChangeCombiner, Serializable

    public class SimilarChangeCombiner
    extends Object
    implements ChangeCombiner
    Combines similar changes, for instance the changes refer to the same property value. For instance for such a property value adding and removing is a no-op but removing and adding is a change.
    Author:
    Ulrich Kreher
    See Also:
    Serialized Form
    • Constructor Detail

      • SimilarChangeCombiner

        protected SimilarChangeCombiner()
        Creates a new combiner for similar changes.
    • Method Detail

      • combineChanges

        public ChangeType combineChanges​(ChangeType type1,
                                         ChangeType type2)
        Description copied from interface: ChangeCombiner
        Combines two changes, for a property.
        Specified by:
        combineChanges in interface ChangeCombiner
        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.