# Interface IThreeWayDiff

All Superinterfaces:
  `IDiff`

All Known Implementing Classes:
  `ThreeWayDiff`

public interface IThreeWayDiff extends IDiff
A three-way delta that describe the synchronization state between two contributors and an ancestor. For simplicity, we refer to one of the contributors as the local and the other as the remote. A three-way delta is represented as a combination of two two-way deltas, one between the ancestor and local and the other between the ancestor and remote. For a three-way delta, clients can assume that the before state of both the local and remote changes are the same.

Since:
  3.2
Restriction:
  This interface is not intended to be implemented by clients. Clients that need to create deltas should instead use `ThreeWayDiff`.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONFLICTING`
Constant (bit mask) indicating that there is both a local change and a remote change.
`static final int`
`DIRECTION_MASK`
Bit mask for extracting the synchronization direction.
`static final int`
`INCOMING`
Constant (bit mask) indicating that there is a local change.
`static final int`
`OUTGOING`
Constant (bit mask) indicating that there is a local change.

### Fields inherited from interface IDiff

`ADD, CHANGE, NO_CHANGE, REMOVE`

## Method Summary

Modifier and Type
Method
Description
`int`
`getDirection()`
Return the direction of this three-way delta.
`ITwoWayDiff`
`getLocalChange()`
Return the local change associated with this delta.
`ITwoWayDiff`
`getRemoteChange()`
Return the remote change associated with this delta.

### Methods inherited from interface IDiff

`getKind, getPath, toDiffString`

## Field Details

### OUTGOING

static final int OUTGOING
Constant (bit mask) indicating that there is a local change.

See Also:
  - `getDirection()`
  - Constant Field Values

### INCOMING

static final int INCOMING
Constant (bit mask) indicating that there is a local change.

See Also:
  - `getDirection()`
  - Constant Field Values

### CONFLICTING

static final int CONFLICTING
Constant (bit mask) indicating that there is both a local change and a remote change. This flag is equivalent to `OUTGOING | INCOMING`.

See Also:
  - `getDirection()`
  - Constant Field Values

### DIRECTION_MASK

static final int DIRECTION_MASK
Bit mask for extracting the synchronization direction.

See Also:
  - Constant Field Values

## Method Details

### getLocalChange

ITwoWayDiff getLocalChange()
Return the local change associated with this delta. If there is no local change, either a delta with kind `IDiff.NO_CHANGE` is returned or `null` may be returned.

Returns:
  the local change associated with this delta or `null`

### getRemoteChange

ITwoWayDiff getRemoteChange()
Return the remote change associated with this delta. If there is no remote change, either a delta with kind `IDiff.NO_CHANGE` is returned or `null` may be returned.

Returns:
  the remote change associated with this delta or `null`

### getDirection

int getDirection()
Return the direction of this three-way delta.

Returns:
  the direction of this three-way delta
See Also:
  - `INCOMING`
  - `OUTGOING`
  - `CONFLICTING`