Package org.eclipse.emf.compare

## Interface Comparison

All Superinterfaces:
  `EObject`, `Notifier`

All Known Implementing Classes:
  `ComparisonImpl`, `ComparisonSpec`

    public interface Comparison
    extends EObject

A representation of the model object 'Comparison'. This will act as the "root" of a comparison. It will reference one match for every root of the input models, along with the differences detected for each of them.

The following features are supported:

- `Matched Resources`
- `Matches`
- `Conflicts`
- `Equivalences`
- `Three Way`

See Also:
  `ComparePackage.getComparison()`
Generated:

### Field Summary

Fields
`static String` `copyright`

### Method Summary

All Methods Instance Methods Abstract Methods
`EList<Conflict>` `getConflicts()` Returns the value of the 'Conflicts' containment reference list.
`Diagnostic` `getDiagnostic()` Returns the value of the 'Diagnostic' attribute.
`EList<Diff>` `getDifferences()` Returns all differences contained by this Comparison and its children.
`EList<Diff>` `getDifferences​(EObject element)` Returns all differences that reference the given EObject (for instance, all ReferenceChanges that reference the given EObject through the "value" EReference).
`IEqualityHelper` `getEqualityHelper()`
`EList<Equivalence>` `getEquivalences()` Returns the value of the 'Equivalences' containment reference list.
`Match` `getMatch​(EObject element)` Finds and return the Match for the given EObject.
`EList<MatchResource>` `getMatchedResources()` Returns the value of the 'Matched Resources' containment reference list.
`EList<Match>` `getMatches()` Returns the value of the 'Matches' containment reference list.
`boolean` `isThreeWay()` Returns the value of the 'Three Way' attribute.
`void` `setDiagnostic​(Diagnostic value)` Sets the value of the '`Diagnostic`' attribute.
`void` `setThreeWay​(boolean value)` Sets the value of the '`Three Way`' attribute.

### Methods inherited from interface org.eclipse.emf.ecore.EObject

`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

### Methods inherited from interface org.eclipse.emf.common.notify.Notifier

`eAdapters, eDeliver, eNotify, eSetDeliver`

### Field Detail

#### copyright

    static final String copyright

See Also:
  Constant Field Values
Generated:

### Method Detail

#### getMatchedResources

    EList<MatchResource> getMatchedResources()

Returns the value of the 'Matched Resources' containment reference list. The list contents are of type `MatchResource`. This contains the mappings for each compared Resource.

Returns:
  the value of the 'Matched Resources' containment reference list.
See Also:
  `ComparePackage.getComparison_MatchedResources()`
Generated:

#### getMatches

    EList<Match> getMatches()

Returns the value of the 'Matches' containment reference list. The list contents are of type `Match`. This contains the match tree "mimicking" the input models' hierarchy.

Returns:
  the value of the 'Matches' containment reference list.
See Also:
  `ComparePackage.getComparison_Matches()`
Generated:

#### getConflicts

    EList<Conflict> getConflicts()

Returns the value of the 'Conflicts' containment reference list. The list contents are of type `Conflict`. If we detected any conflict during the comparison process, this will contain them.

Returns:
  the value of the 'Conflicts' containment reference list.
See Also:
  `ComparePackage.getComparison_Conflicts()`
Generated:

#### getEquivalences

    EList<Equivalence> getEquivalences()

Returns the value of the 'Equivalences' containment reference list. The list contents are of type `Equivalence`. If we detected any equivalence between diffs during the comparison process, this will contain them.

Returns:
  the value of the 'Equivalences' containment reference list.
See Also:
  `ComparePackage.getComparison_Equivalences()`
Generated:

#### getDifferences

    EList<Diff> getDifferences()

Returns all differences contained by this Comparison and its children.

Generated:

#### getDifferences

    EList<Diff> getDifferences​(EObject element)

Returns all differences that reference the given EObject (for instance, all ReferenceChanges that reference the given EObject through the "value" EReference).

To get differences detected on the given EObject or one of its counterpart in left, right or origin, you should call the following code:

     Match match = getMatch(eObject);
     if (match != null) {
            differences = match.getDifferences();
     }

Parameters:
  `element` - The EObject for which we seek all related differences.
Generated:

#### getMatch

    Match getMatch​(EObject element)

Finds and return the Match for the given EObject.

Parameters:
  `element` - The EObject for which we seek the match.
Generated:

#### getEqualityHelper

    IEqualityHelper getEqualityHelper()

Generated:

#### isThreeWay

    boolean isThreeWay()

Returns the value of the 'Three Way' attribute.

Returns:
  the value of the 'Three Way' attribute.
See Also:
  `setThreeWay(boolean)`, `ComparePackage.getComparison_ThreeWay()`
Generated:

#### setThreeWay

    void setThreeWay​(boolean value)

Sets the value of the '`Three Way`' attribute.

Parameters:
  `value` - the new value of the 'Three Way' attribute.
See Also:
  `isThreeWay()`
Generated:

#### getDiagnostic

    Diagnostic getDiagnostic()

Returns the value of the 'Diagnostic' attribute.

If the meaning of the 'Diagnostic' attribute isn't clear, there really should be more of a description here...

Returns:
  the value of the 'Diagnostic' attribute.
See Also:
  `setDiagnostic(Diagnostic)`, `ComparePackage.getComparison_Diagnostic()`
Generated:

#### setDiagnostic

    void setDiagnostic​(Diagnostic value)

Sets the value of the '`Diagnostic`' attribute.

Parameters:
  `value` - the new value of the 'Diagnostic' attribute.
See Also:
  `getDiagnostic()`
Generated: