org.eclipse.emf.compare.rcp.ui.mergeviewer.item

## Interface IMergeViewerItem

All Superinterfaces:
  Adapter

All Known Subinterfaces:
  IMergeViewerItem.Container

All Known Implementing Classes:
  MergeViewerItem, MergeViewerItem.Container, ResourceAttachmentChangeMergeViewerItem

    public interface IMergeViewerItem
    extends Adapter

An IMergeViewerItem associate a Diff and its left side, right side and ancestor side values. An IMergeViewerItem also known its parent.

Since:
  4.0

### Nested Class Summary

Nested Classes
`static interface` `IMergeViewerItem.Container` Deprecated. IMergeViewerItem.Container is no longer needed since its functionality is now provided by `IMergeViewerItemContentProvider`. Use an `IMergeViewerItem` instead.

### Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter

`Adapter.Internal`

### Field Summary

Fields
`static com.google.common.base.Predicate<IMergeViewerItem>` `IS_INSERTION_POINT` A predicate to know if the given Item is an insertion point.

### Method Summary

All Methods Instance Methods Abstract Methods
`Object` `getAncestor()` Returns the ancestor side value of the Diff.
`Diff` `getDiff()` The Diff associated with the Item.
`Object` `getLeft()` Returns the left side value of the Diff.
`IMergeViewerItem.Container` `getParent()` Returns the parent of this element.
`Object` `getRight()` Returns the right side value of the Diff.
`IMergeViewer.MergeViewerSide` `getSide()` Returns the side of the Diff.
`Object` `getSideValue(IMergeViewer.MergeViewerSide side)` Returns the appropriate value according to the given side.
`boolean` `isInsertionPoint()` Returns true if the Item is an insertion point, false otherwise.

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

`getTarget, isAdapterForType, notifyChanged, setTarget`

### Field Detail

#### IS_INSERTION_POINT

    static final com.google.common.base.Predicate<IMergeViewerItem> IS_INSERTION_POINT

A predicate to know if the given Item is an insertion point.

### Method Detail

#### getDiff

    Diff getDiff()

The Diff associated with the Item.

Returns:
  the Diff associated with the Item.

#### getLeft

    Object getLeft()

Returns the left side value of the Diff.

Returns:
  the left side value of the Diff.

#### getRight

    Object getRight()

Returns the right side value of the Diff.

Returns:
  the right side value of the Diff.

#### getAncestor

    Object getAncestor()

Returns the ancestor side value of the Diff.

Returns:
  the ancestor side value of the Diff.

#### getSideValue

    Object getSideValue(IMergeViewer.MergeViewerSide side)

Returns the appropriate value according to the given side.

Parameters:
  `side` - the given side.
Returns:
  the appropriate value according to the given side.

#### getSide

    IMergeViewer.MergeViewerSide getSide()

Returns the side of the Diff.

Returns:
  the side of the Diff.

#### isInsertionPoint

    boolean isInsertionPoint()

Returns true if the Item is an insertion point, false otherwise.

Returns:
  true if the Item is an insertion point, false otherwise.

#### getParent

    IMergeViewerItem.Container getParent()

Returns the parent of this element. If the object is the root of a hierarchy `null` is returned.

Returns:
  the parent of this element, or `null` if the element has no parent