org.eclipse.emf.compare.merge

## Class DelegatingMerger

- java.lang.Object
- - org.eclipse.emf.compare.merge.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 Summary

Constructors
Constructor and Description
`DelegatingMerger(IMerger merger, IMergeCriterion criterion)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `copyLeftToRight(Diff target, Monitor monitor)` Call copyLeftToRight on the wrapped merger with the right criterion.
`void` `copyRightToLeft(Diff target, Monitor monitor)` Call copyRightToLeft on the wrapped merger with the right criterion.
`IMergeCriterion` `getCriterion()`
`IMerger` `getMerger()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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()

#### getCriterion

    public IMergeCriterion getCriterion()