org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl

## Class MatchAccessor

- java.lang.Object
- - org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter
  - - org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.impl.MatchAccessor

All Implemented Interfaces:
  ICompareAccessor, ITypedElement

    public class MatchAccessor
    extends AbstractTypedElementAdapter
    implements ICompareAccessor

A specific `ICompareAccessor` for `Match` objects.

Since:
  4.0

### Field Summary

### Fields inherited from interface org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.ITypedElement

`FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE`

### Constructor Summary

Constructors
Constructor and Description
`MatchAccessor(AdapterFactory adapterFactory, Match match, Diff diff, IMergeViewer.MergeViewerSide side)` Creates a new object wrapping the given `eObject`.
`MatchAccessor(AdapterFactory adapterFactory, Match match, IMergeViewer.MergeViewerSide side)` Creates a new object wrapping the given `eObject`.

### Method Summary

All Methods Instance Methods Concrete Methods
`Comparison` `getComparison()` Returns the comparison object used by this accessor.
`org.eclipse.swt.graphics.Image` `getImage()` Returns an image for this object.
`IMergeViewerItem` `getInitialItem()` Returns the initial item of this accessor.
`com.google.common.collect.ImmutableList<? extends IMergeViewerItem>` `getItems()` Returns the list of items known by this accessor.
`String` `getName()` Returns the name of this object.
`protected IMergeViewer.MergeViewerSide` `getSide()` Returns the side of this accessor.
`String` `getType()` Returns the type of this object.

### Methods inherited from class org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.impl.AbstractTypedElementAdapter

`getAdapterFactory, getItemDelegator, getRootAdapterFactory`

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

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

### Constructor Detail

#### MatchAccessor

    public MatchAccessor(AdapterFactory adapterFactory,
                         Match match,
                         IMergeViewer.MergeViewerSide side)

Creates a new object wrapping the given `eObject`.

Parameters:
  `adapterFactory` - the adapter factory used to create the accessor.
  `match` - the match to associate with this accessor.
  `side` - the side of this accessor.

#### MatchAccessor

    public MatchAccessor(AdapterFactory adapterFactory,
                         Match match,
                         Diff diff,
                         IMergeViewer.MergeViewerSide side)

Creates a new object wrapping the given `eObject`.

Parameters:
  `adapterFactory` - the adapter factory used to create the accessor.
  `match` - the match to associate with this accessor.
  `diff` - the diff associated with this accessor.
  `side` - the side of this accessor.

### Method Detail

#### getSide

    protected final IMergeViewer.MergeViewerSide getSide()

Returns the side of this accessor.

Returns:
  the side of this accessor.

#### getName

    public String getName()

Returns the name of this object. The name is used when displaying this object in the UI.

Specified by:
  `getName` in interface `ITypedElement`
Returns:
  the name of this object
See Also:
  `ITypedElement.getName()`

#### getImage

    public org.eclipse.swt.graphics.Image getImage()

Returns an image for this object. This image is used when displaying this object in the UI.

Specified by:
  `getImage` in interface `ITypedElement`
Returns:
  the image of this object or `null` if this type of input has no image
See Also:
  `ITypedElement.getImage()`

#### getType

    public String getType()

Returns the type of this object. For objects with a file name this is typically the file extension. For folders its the constant `FOLDER_TYPE`. The type is used for determining a suitable viewer for this object.

Specified by:
  `getType` in interface `ITypedElement`
Returns:
  the type of this object
See Also:
  `ITypedElement.getType()`

#### getComparison

    public Comparison getComparison()

Returns the comparison object used by this accessor.

Specified by:
  `getComparison` in interface `ICompareAccessor`
Returns:
  the comparison object used by this accessor.
See Also:
  `ICompareAccessor.getComparison()`

#### getInitialItem

    public IMergeViewerItem getInitialItem()

Returns the initial item of this accessor.

Specified by:
  `getInitialItem` in interface `ICompareAccessor`
Returns:
  the initial item of this accessor.
See Also:
  `ICompareAccessor.getInitialItem()`

#### getItems

    public com.google.common.collect.ImmutableList<? extends IMergeViewerItem> getItems()

Returns the list of items known by this accessor.

Specified by:
  `getItems` in interface `ICompareAccessor`
Returns:
  the list of items known by this accessor.
See Also:
  `ICompareAccessor.getItems()`