Package org.eclipse.emf.compare.match.impl

## Class MatchEngineFactoryImpl

- java.lang.Object
- - org.eclipse.emf.compare.match.impl.MatchEngineFactoryImpl

All Implemented Interfaces:
  `IMatchEngine.Factory`

    public class MatchEngineFactoryImpl
    extends Object
    implements IMatchEngine.Factory

The default implementation of the `IMatchEngine.Factory.Registry`.

Since:
  3.0

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.emf.compare.match.IMatchEngine.Factory

`IMatchEngine.Factory.Registry`

### Field Summary

Fields
`protected IMatchEngine` `matchEngine` The match engine created by this factory.

### Constructor Summary

Constructors
`MatchEngineFactoryImpl()` Constructor that instantiate a `DefaultMatchEngine`.
`MatchEngineFactoryImpl​(IEObjectMatcher matcher, IComparisonFactory comparisonFactory)` Deprecated. Using this will ignore any weight provider or equality helper extension provided through extension points.
`MatchEngineFactoryImpl​(UseIdentifiers useIDs)` Constructor that instantiate a `DefaultMatchEngine` that will use identifiers as specified by the given `useIDs` enumeration.
`MatchEngineFactoryImpl​(UseIdentifiers useIDs, WeightProvider.Descriptor.Registry weightProviderRegistry)` Constructor that instantiate a `DefaultMatchEngine` that will use identifiers as specified by the given `useIDs` enumeration.
`MatchEngineFactoryImpl​(UseIdentifiers useIDs, WeightProvider.Descriptor.Registry weightProviderRegistry, EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)` Constructor that instantiate a `DefaultMatchEngine` that will use identifiers as specified by the given `useIDs` enumeration.

### Method Summary

All Methods Instance Methods Concrete Methods
`IMatchEngine` `getMatchEngine()` Returns the wrapped match engine.
`int` `getRanking()` Returns the ranking of this match engine factory.
`boolean` `isMatchEngineFactoryFor​(IComparisonScope scope)` Check if the match engine factory is a good candidate for comparison.
`void` `setEqualityHelperExtensionProviderRegistry​(EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)` The match engine may need a Equality Helper Extension.
`void` `setRanking​(int r)` Set the ranking of this match engine factory.

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

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

### Field Detail

#### matchEngine

    protected IMatchEngine matchEngine

The match engine created by this factory.

### Constructor Detail

#### MatchEngineFactoryImpl

    public MatchEngineFactoryImpl()

Constructor that instantiate a `DefaultMatchEngine`. This match engine will use a the standalone weight provider registry {@link WeightProviderDescriptorRegistryImpl.createStandaloneInstance()}.

#### MatchEngineFactoryImpl

    public MatchEngineFactoryImpl​(UseIdentifiers useIDs)

Constructor that instantiate a `DefaultMatchEngine` that will use identifiers as specified by the given `useIDs` enumeration. This match engine will use a the standalone weight provider registry {@link WeightProviderDescriptorRegistryImpl.createStandaloneInstance()}.

Parameters:
  `useIDs` - the kinds of matcher to use.

#### MatchEngineFactoryImpl

    public MatchEngineFactoryImpl​(UseIdentifiers useIDs,
                                  WeightProvider.Descriptor.Registry weightProviderRegistry)

Constructor that instantiate a `DefaultMatchEngine` that will use identifiers as specified by the given `useIDs` enumeration.

Parameters:
  `useIDs` - the kinds of matcher to use.
  `weightProviderRegistry` - A match engine needs a WeightProvider in case of this match engine do not use identifiers.

#### MatchEngineFactoryImpl

    public MatchEngineFactoryImpl​(UseIdentifiers useIDs,
                                  WeightProvider.Descriptor.Registry weightProviderRegistry,
                                  EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)

Constructor that instantiate a `DefaultMatchEngine` that will use identifiers as specified by the given `useIDs` enumeration.

Parameters:
  `useIDs` - the kinds of matcher to use.
  `weightProviderRegistry` - A match engine needs a WeightProvider in case of this match engine do not use identifiers.
  `equalityHelperExtensionProviderRegistry` - A match engine may need a Equality Helper Extension.

#### MatchEngineFactoryImpl

    @Deprecated
    public MatchEngineFactoryImpl​(IEObjectMatcher matcher,
                                  IComparisonFactory comparisonFactory)

Deprecated.
Using this will ignore any weight provider or equality helper extension provided through extension points. Use another of the constructors if you need this functionality.
Constructor that instantiate a `DefaultMatchEngine` with the given parameters.

Parameters:
  `matcher` - The matcher that will be in charge of pairing EObjects together for this comparison process.
  `comparisonFactory` - factory that will be use to instantiate Comparison as return by match() methods.

### Method Detail

#### getMatchEngine

    public IMatchEngine getMatchEngine()

Returns the wrapped match engine.

Specified by:
  `getMatchEngine` in interface `IMatchEngine.Factory`
Returns:
  the wrapped match engine.
See Also:
  `IMatchEngine.Factory.getMatchEngine()`

#### getRanking

    public int getRanking()

Returns the ranking of this match engine factory.

Specified by:
  `getRanking` in interface `IMatchEngine.Factory`
Returns:
  The ranking.
See Also:
  `IMatchEngine.Factory.getRanking()`

#### setRanking

    public void setRanking​(int r)

Set the ranking of this match engine factory.

Specified by:
  `setRanking` in interface `IMatchEngine.Factory`
Parameters:
  `r` - The ranking.
See Also:
  `IMatchEngine.Factory.setRanking(int)`

#### isMatchEngineFactoryFor

    public boolean isMatchEngineFactoryFor​(IComparisonScope scope)

Check if the match engine factory is a good candidate for comparison.

Specified by:
  `isMatchEngineFactoryFor` in interface `IMatchEngine.Factory`
Parameters:
  `scope` - The scope on which the match engine factory will be applied.
Returns:
  True if it is the good candidate, false otherwise.
See Also:
  `IMatchEngine.Factory.isMatchEngineFactoryFor(org.eclipse.emf.compare.scope.IComparisonScope)`

#### setEqualityHelperExtensionProviderRegistry

    public void setEqualityHelperExtensionProviderRegistry​(EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)

The match engine may need a Equality Helper Extension.

Parameters:
  `equalityHelperExtensionProviderRegistry` - the registry to associate with the match engine.