Class DelegatingMerger


  • public class DelegatingMerger
    extends Object
    Wrapper of mergers that makes sure that a given IMergeCriterion is passed to the wrapped merger before calling its merge method, and that the former value of criterion used by the wrapped merger is restored afterwards.
    Since:
    3.4
    • Constructor Detail

      • DelegatingMerger

        public DelegatingMerger​(IMerger merger,
                                IMergeCriterion criterion)
        Constructor.
        Parameters:
        merger - The merger, cannot be null
        criterion - The criterion, can be null
    • Method Detail

      • copyRightToLeft

        public void copyRightToLeft​(Diff target,
                                    Monitor monitor)
        Call copyRightToLeft on the wrapped merger with the right criterion.
        Parameters:
        target - the diff
        monitor - the monitor
      • copyLeftToRight

        public void copyLeftToRight​(Diff target,
                                    Monitor monitor)
        Call copyLeftToRight on the wrapped merger with the right criterion.
        Parameters:
        target - the diff
        monitor - the monitor
      • getMerger

        public IMerger getMerger()