Package org.eclipse.emf.compare.merge

## Interface IMerger

All Known Subinterfaces:
  `IMerger2`

All Known Implementing Classes:
  `AbstractMerger`, `AdditiveConflictMerger`, `AdditiveReferenceChangeMerger`, `AdditiveResourceAttachmentChangeMerger`, `AttributeChangeMerger`, `ConflictMerger`, `FeatureMapChangeMerger`, `PseudoConflictMerger`, `ReferenceChangeMerger`, `ResourceAttachmentChangeMerger`, `ResourceLocationChangeMerger`

    public interface IMerger

Mergers are used by EMF Compare to merge specific differences from one side to the other. A number of default mergers are provided by EMF Compare, but they can be sub-classed and extended by clients through the extension point "org.eclipse.emf.compare.ide.mergerExtension".

Clients are encouraged to subclass AbstractMerger instead of implementing IMerger so that they can benefit from a maximum of the common procedures.

Since:
  3.0

### Nested Class Summary

Nested Classes
`static interface` `IMerger.Registry` This will hold all registered mergers.
`static interface` `IMerger.Registry2` Registry that can provide its mergers sorted by rank descending.
`static class` `IMerger.RegistryImpl` A default implementation of an `IMerger.Registry`.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `copyLeftToRight​(Diff target, Monitor monitor)` Executes the copy from left to right.
`void` `copyRightToLeft​(Diff target, Monitor monitor)` Executes the copy from right to left.
`int` `getRanking()` Returns the ranking of this merger.
`IMerger.Registry` `getRegistry()` Get the registry.
`boolean` `isMergerFor​(Diff target)` Check if the merger is a good candidate to merge the given difference.
`void` `setRanking​(int parseInt)` Set the ranking of this merger.
`void` `setRegistry​(IMerger.Registry registry)` Set the registry containing this merger.

### Method Detail

#### isMergerFor

    boolean isMergerFor​(Diff target)

Check if the merger is a good candidate to merge the given difference.

Parameters:
  `target` - The given target difference.
Returns:
  True if it is the good candidate, false otherwise.

#### getRanking

    int getRanking()

Returns the ranking of this merger.

Returns:
  The ranking.

#### setRanking

    void setRanking​(int parseInt)

Set the ranking of this merger.

Parameters:
  `parseInt` - The ranking.

#### copyRightToLeft

    void copyRightToLeft​(Diff target,
                         Monitor monitor)

Executes the copy from right to left.

Parameters:
  `target` - The difference to handle.
  `monitor` - Monitor.

#### copyLeftToRight

    void copyLeftToRight​(Diff target,
                         Monitor monitor)

Executes the copy from left to right.

Parameters:
  `target` - The difference to handle.
  `monitor` - Monitor.

#### setRegistry

    void setRegistry​(IMerger.Registry registry)

Set the registry containing this merger.

Parameters:
  `registry` - The merger registry.

#### getRegistry

    IMerger.Registry getRegistry()

Get the registry.

Returns:
  The registry.