Package 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
Description
`DelegatingMerger(IMerger merger, IMergeCriterion criterion)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`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 Details

### DelegatingMerger

public DelegatingMerger(IMerger merger, IMergeCriterion criterion)
Constructor.

Parameters:
  `merger` - The merger, cannot be `null`
  `criterion` - The criterion, can be `null`

## Method Details

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