Package org.eclipse.emf.compare

# Interface Match

All Superinterfaces:
  `EObject`, `Notifier`

All Known Implementing Classes:
  `MatchImpl`, `MatchSpec`, `NotLoadedFragmentMatch`

public interface Match extends EObject
A representation of the model object 'Match'. A MatchElement describes the mapping between the EObjects of two or three resources. This will reference all three of left, right and origin resources. However, note that instances of this class will also represent unmatched elements, in which case only one of either "left" or "right" will be assigned.

The following features are supported:

- `Submatches`
- `Differences`
- `Left`
- `Right`
- `Origin`

See Also:
  - `ComparePackage.getMatch()`
Generated:

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`copyright`

## Method Summary

Modifier and Type
Method
Description
`Iterable<Diff>`
`getAllDifferences()`
Finds and returns all differences contained in this Match and its children, recursively.
`Iterable<Match>`
`getAllSubmatches()`
Finds and returns all matches contained in this Match and its children, recursively.
`Comparison`
`getComparison()`
Finds and return the Comparison containing this Match.
`EList<Diff>`
`getDifferences()`
Returns the value of the 'Differences' containment reference list.
`EObject`
`getLeft()`
Returns the value of the 'Left' reference.
`EObject`
`getOrigin()`
Returns the value of the 'Origin' reference.
`EObject`
`getRight()`
Returns the value of the 'Right' reference.
`EList<Match>`
`getSubmatches()`
Returns the value of the 'Submatches' containment reference list.
`void`
`setLeft(EObject value)`
Sets the value of the '`Left`' reference.
`void`
`setOrigin(EObject value)`
Sets the value of the '`Origin`' reference.
`void`
`setRight(EObject value)`
Sets the value of the '`Right`' reference.

### 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 Details

### copyright

static final String copyright

See Also:
  - Constant Field Values
Generated:

## Method Details

### getSubmatches

EList<Match> getSubmatches()
Returns the value of the 'Submatches' containment reference list. The list contents are of type `Match`. The MatchElements will "mimic" the hierarchy of the input model(s). This containment feature will serve that purpose.

Returns:
  the value of the 'Submatches' containment reference list.
See Also:
  - `ComparePackage.getMatch_Submatches()`
Generated:

### getDifferences

EList<Diff> getDifferences()
Returns the value of the 'Differences' containment reference list. The list contents are of type `Diff`. This will contain the list of all differences pertaining to this mapping, if any.

Returns:
  the value of the 'Differences' containment reference list.
See Also:
  - `ComparePackage.getMatch_Differences()`
Generated:

### getLeft

EObject getLeft()
Returns the value of the 'Left' reference. This can be null in the case of unmatched elements in the right model. In all other cases, it will reference the left element of this mapping.

Returns:
  the value of the 'Left' reference.
See Also:
  - `setLeft(EObject)`
  - `ComparePackage.getMatch_Left()`
Generated:

### setLeft

void setLeft(EObject value)
Sets the value of the '`Left`' reference.

Parameters:
  `value` - the new value of the 'Left' reference.
See Also:
  - `getLeft()`
Generated:

### getRight

EObject getRight()
Returns the value of the 'Right' reference. This can be null in the case of unmatched elements in the left model. In all other cases, it will reference the right element of this mapping.

Returns:
  the value of the 'Right' reference.
See Also:
  - `setRight(EObject)`
  - `ComparePackage.getMatch_Right()`
Generated:

### setRight

void setRight(EObject value)
Sets the value of the '`Right`' reference.

Parameters:
  `value` - the new value of the 'Right' reference.
See Also:
  - `getRight()`
Generated:

### getOrigin

EObject getOrigin()
Returns the value of the 'Origin' reference. This can be null in the case of two-way comparisons, or unmatched elements that are only located in either left or right, i.e an element that was added since the origin, either in the left copy or the right one. In any other course of event, this will reference the origin element of this mapping.

Returns:
  the value of the 'Origin' reference.
See Also:
  - `setOrigin(EObject)`
  - `ComparePackage.getMatch_Origin()`
Generated:

### setOrigin

void setOrigin(EObject value)
Sets the value of the '`Origin`' reference.

Parameters:
  `value` - the new value of the 'Origin' reference.
See Also:
  - `getOrigin()`
Generated:

### getComparison

Comparison getComparison()
Finds and return the Comparison containing this Match.

Generated:

### getAllSubmatches

Iterable<Match> getAllSubmatches()
Finds and returns all matches contained in this Match and its children, recursively.

Generated:

### getAllDifferences

Iterable<Diff> getAllDifferences()
Finds and returns all differences contained in this Match and its children, recursively.

Generated: