org.eclipse.emf.compare

## Interface Diff

All Superinterfaces:
  EObject, Notifier

All Known Subinterfaces:
  AttributeChange, FeatureMapChange, ReferenceChange, ResourceAttachmentChange, ResourceLocationChange

All Known Implementing Classes:
  AttributeChangeImpl, AttributeChangeSpec, DiffImpl, DiffSpec, FeatureMapChangeImpl, FeatureMapChangeSpec, ReferenceChangeImpl, ReferenceChangeSpec, ResourceAttachmentChangeImpl, ResourceAttachmentChangeSpec, ResourceLocationChangeImpl, ResourceLocationChangeSpec

    public interface Diff
    extends EObject

A representation of the model object 'Diff'. A DiffElement describes a difference related to the EObjects mapped by its parent MatchElement.

The following features are supported:

- `Match`
- `Requires`
- `Required By`
- `Implies`
- `Implied By`
- `Refines`
- `Refined By`
- `Prime Refining`
- `Kind`
- `Source`
- `State`
- `Equivalence`
- `Conflict`

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

### Field Summary

Fields
`static String` `copyright`

### Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods
`void` `copyLeftToRight()` Deprecated.
`void` `copyRightToLeft()` Deprecated.
`void` `discard()` This will remove the diff from the model, effectively "forgetting" about it.
`Conflict` `getConflict()` Returns the value of the 'Conflict' reference.
`Equivalence` `getEquivalence()` Returns the value of the 'Equivalence' reference.
`EList<Diff>` `getImpliedBy()` Returns the value of the 'Implied By' reference list.
`EList<Diff>` `getImplies()` Returns the value of the 'Implies' reference list.
`DifferenceKind` `getKind()` Returns the value of the 'Kind' attribute.
`Match` `getMatch()` Returns the value of the 'Match' container reference.
`Diff` `getPrimeRefining()` Returns the value of the 'Prime Refining' reference
`EList<Diff>` `getRefinedBy()` Returns the value of the 'Refined By' reference list.
`EList<Diff>` `getRefines()` Returns the value of the 'Refines' reference list.
`EList<Diff>` `getRequiredBy()` Returns the value of the 'Required By' reference list.
`EList<Diff>` `getRequires()` Returns the value of the 'Requires' reference list.
`DifferenceSource` `getSource()` Returns the value of the 'Source' attribute.
`DifferenceState` `getState()` Returns the value of the 'State' attribute.
`void` `setConflict(Conflict value)` Sets the value of the '`Conflict`' reference
`void` `setEquivalence(Equivalence value)` Sets the value of the '`Equivalence`' reference
`void` `setKind(DifferenceKind value)` Sets the value of the '`Kind`' attribute.
`void` `setMatch(Match value)` Sets the value of the '`Match`' reference
`void` `setSource(DifferenceSource value)` Sets the value of the '`Source`' attribute.
`void` `setState(DifferenceState value)` Sets the value of the '`State`' 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

#### getMatch

    Match getMatch()

Returns the value of the 'Match' container reference. It is bidirectional and its opposite is '`Differences`'. Back-reference towards this difference's parent match, it points towards the mapping on which this difference has been detected.

Returns:
  the value of the 'Match' container reference.
See Also:
  `setMatch(Match)`
Generated:

#### setMatch

    void setMatch(Match value)

Sets the value of the '`Match`' reference.

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

#### getRequires

    EList<Diff> getRequires()

Returns the value of the 'Requires' reference list. The list contents are of type `Diff`. It is bidirectional and its opposite is ' `Required By`'. This will reference all differences that should be merged before this one.

Returns:
  the value of the 'Requires' reference list.
See Also:
  `ComparePackage.getDiff_Requires()`, `getRequiredBy()`
Generated:

#### getRequiredBy

    EList<Diff> getRequiredBy()

Returns the value of the 'Required By' reference list. The list contents are of type `Diff`. It is bidirectional and its opposite is ' `Requires`'. This will reference all differences that depend on this one for their merging.

Returns:
  the value of the 'Required By' reference list.
See Also:
  `ComparePackage.getDiff_RequiredBy()`, `getRequires()`
Generated:

#### getImplies

    EList<Diff> getImplies()

Returns the value of the 'Implies' reference list. The list contents are of type `Diff`. It is bidirectional and its opposite is '`Implied By`'.

If the meaning of the 'Implies' reference list isn't clear, there really should be more of a description here...

Returns:
  the value of the 'Implies' reference list.
See Also:
  `ComparePackage.getDiff_Implies()`, `getImpliedBy()`
Generated:

#### getImpliedBy

    EList<Diff> getImpliedBy()

Returns the value of the 'Implied By' reference list. The list contents are of type `Diff`. It is bidirectional and its opposite is '`Implies`'.

If the meaning of the 'Implied By' reference list isn't clear, there really should be more of a description here...

Returns:
  the value of the 'Implied By' reference list.
See Also:
  `ComparePackage.getDiff_ImpliedBy()`, `getImplies()`
Generated:

#### getRefines

    EList<Diff> getRefines()

Returns the value of the 'Refines' reference list. The list contents are of type `Diff`. It is bidirectional and its opposite is ' `Refined By`'. This can be used to create "high level" differences to regroup one or more diffs in a common "container". For example, this could be used to regroup n technical differences into one single semantic difference, such as the differences "profile application added" and "reference to stereotype added" that can actually be regrouped under a single, more understandable "stereotype application added".

Returns:
  the value of the 'Refines' reference list.
See Also:
  `ComparePackage.getDiff_Refines()`, `getRefinedBy()`
Generated:

#### getRefinedBy

    EList<Diff> getRefinedBy()

Returns the value of the 'Refined By' reference list. The list contents are of type `Diff`. It is bidirectional and its opposite is ' `Refines`'. This will reference the higher-level difference that shadows this one, if any.

Returns:
  the value of the 'Refined By' reference list.
See Also:
  `ComparePackage.getDiff_RefinedBy()`, `getRefines()`
Generated:

#### getPrimeRefining

    Diff getPrimeRefining()

Returns the value of the 'Prime Refining' reference.

If the meaning of the 'Prime Refining' reference isn't clear, there really should be more of a description here...

Returns:
  the value of the 'Prime Refining' reference.
See Also:
  `ComparePackage.getDiff_PrimeRefining()`
Generated:

#### getKind

    DifferenceKind getKind()

Returns the value of the 'Kind' attribute. The literals are from the enumeration `DifferenceKind`. Describes the kind of this difference, whether it is an addition, deletion, change, or move.

Returns:
  the value of the 'Kind' attribute.
See Also:
  `DifferenceKind`, `setKind(DifferenceKind)`, `ComparePackage.getDiff_Kind()`
Generated:

#### setKind

    void setKind(DifferenceKind value)

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

Parameters:
  `value` - the new value of the 'Kind' attribute.
See Also:
  `DifferenceKind`, `getKind()`
Generated:

#### getConflict

    Conflict getConflict()

Returns the value of the 'Conflict' reference. It is bidirectional and its opposite is '`Differences`'. If this element is in conflict with one (or more) other differences, this will reference the Conflict association.

Returns:
  the value of the 'Conflict' reference.
See Also:
  `setConflict(Conflict)`, `ComparePackage.getDiff_Conflict()`, `Conflict.getDifferences()`
Generated:

#### setConflict

    void setConflict(Conflict value)

Sets the value of the '`Conflict`' reference.

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

#### getSource

    DifferenceSource getSource()

Returns the value of the 'Source' attribute. The literals are from the enumeration `DifferenceSource`. Returns the source of this diff, either one of DifferenceSource.LEFT (for two-way comparisons or differences detected between the left and origin elements) or DifferenceSource.RIGHT (for differences between the right and origin elements).

Returns:
  the value of the 'Source' attribute.
See Also:
  `DifferenceSource`, `setSource(DifferenceSource)`, `ComparePackage.getDiff_Source()`
Generated:

#### setSource

    void setSource(DifferenceSource value)

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

Parameters:
  `value` - the new value of the 'Source' attribute.
See Also:
  `DifferenceSource`, `getSource()`
Generated:

#### getState

    DifferenceState getState()

Returns the value of the 'State' attribute. The literals are from the enumeration `DifferenceState`. Returns the current state of this diff, either one of DifferenceState.UNRESOLVED (Diff is still in its initial state), DifferenceState.MERGED when the Diff has been merged or DifferenceState.DISCARDED if the user chose to ignore this difference.

Returns:
  the value of the 'State' attribute.
See Also:
  `DifferenceState`, `setState(DifferenceState)`, `ComparePackage.getDiff_State()`
Generated:

#### setState

    void setState(DifferenceState value)

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

Parameters:
  `value` - the new value of the 'State' attribute.
See Also:
  `DifferenceState`, `getState()`
Generated:

#### getEquivalence

    Equivalence getEquivalence()

Returns the value of the 'Equivalence' reference. It is bidirectional and its opposite is '`Differences`'. If this diff is equivalent to another, we will reference the equivalence from here. For example, if a reference has an eOpposite, we will detect one diff for each side of the bidirectional reference, yet merging one of these diffs is enough. We consider them equivalent.

Returns:
  the value of the 'Equivalence' reference.
See Also:
  `setEquivalence(Equivalence)`, `ComparePackage.getDiff_Equivalence()`, `Equivalence.getDifferences()`
Generated:

#### setEquivalence

    void setEquivalence(Equivalence value)

Sets the value of the '`Equivalence`' reference.

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

#### copyRightToLeft

    @Deprecated
    void copyRightToLeft()

Deprecated.
This will merge the diff from left to right.

Generated:

#### copyLeftToRight

    @Deprecated
    void copyLeftToRight()

Deprecated.
This will merge the diff from right to left.

Generated:

#### discard

    void discard()

This will remove the diff from the model, effectively "forgetting" about it.

Generated: