Package org.eclipse.emf.compare.internal.conflict

## Class ComparisonIndex

- java.lang.Object
- - org.eclipse.emf.compare.internal.conflict.ComparisonIndex

    public final class ComparisonIndex
    extends Object

Index of diffs in a comparison.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Collection<ReferenceChange>` `getReferenceChangesByValue​(EObject value)` The indexed `ReferenceChange`s whose value is in the given Match.
`Collection<ReferenceChange>` `getReferenceChangesByValueMatch​(Match valueMatch)` The indexed `ReferenceChange`s whose value is in the given Match.
`Collection<ReferenceChange>` `getReferenceChangesByValueURI​(URI valueURI)` The indexed `ReferenceChange`s whose value has the given URI (only unresolved proxies are indexed that way).
`static ComparisonIndex` `index​(Comparison comparison, Monitor monitor)` Utility method to index a comparison.

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

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

### Method Detail

#### index

    public static ComparisonIndex index​(Comparison comparison,
                                        Monitor monitor)

Utility method to index a comparison.

Parameters:
  `comparison` - The comparison to index, O(nb. diff)
  `monitor` - the monitor
Returns:
  The index of the given comparison.

#### getReferenceChangesByValue

    public Collection<ReferenceChange> getReferenceChangesByValue​(EObject value)

The indexed `ReferenceChange`s whose value is in the given Match.

Parameters:
  `value` - The target `EObject`
Returns:
  A never null collection of `ReferenceChange`s whose value is in the same match as the given EObject, or has the same URI.

#### getReferenceChangesByValueMatch

    public Collection<ReferenceChange> getReferenceChangesByValueMatch​(Match valueMatch)

The indexed `ReferenceChange`s whose value is in the given Match.

Parameters:
  `valueMatch` - The target `Match`
Returns:
  A never null collection of `ReferenceChange`s whose value in the given match.

#### getReferenceChangesByValueURI

    public Collection<ReferenceChange> getReferenceChangesByValueURI​(URI valueURI)

The indexed `ReferenceChange`s whose value has the given URI (only unresolved proxies are indexed that way).

Parameters:
  `valueURI` - The URI to look for
Returns:
  A never null collection of `ReferenceChange`s whose value is unresolved and has the given URI