Class ThreeWayDiff
- java.lang.Object
-
- org.eclipse.team.core.diff.provider.Diff
-
- org.eclipse.team.core.diff.provider.ThreeWayDiff
-
- All Implemented Interfaces:
IDiff,IThreeWayDiff
public class ThreeWayDiff extends Diff implements IThreeWayDiff
Implementation ofIThreeWayDiff.- Since:
- 3.2
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.team.core.diff.IThreeWayDiff
CONFLICTING, DIRECTION_MASK, INCOMING, OUTGOING
-
-
Constructor Summary
Constructors Constructor Description ThreeWayDiff(ITwoWayDiff localChange, ITwoWayDiff remoteChange)Create a three-way delta from the two changes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetDirection()Return the direction of this three-way delta.ITwoWayDiffgetLocalChange()Return the local change associated with this delta.ITwoWayDiffgetRemoteChange()Return the remote change associated with this delta.StringtoDiffString()Return a string that describes the difference represented by this node.-
Methods inherited from class org.eclipse.team.core.diff.provider.Diff
getKind, getPath, getStatus, hashCode
-
-
-
-
Constructor Detail
-
ThreeWayDiff
public ThreeWayDiff(ITwoWayDiff localChange, ITwoWayDiff remoteChange)
Create a three-way delta from the two changes. At least one change must be provided (i.e. either change may benullbut at least one must be non-null).- Parameters:
localChange- the local change in the model object ornullif there is no local changeremoteChange- the remote change in the model object ornullif there is no local change
-
-
Method Detail
-
getLocalChange
public ITwoWayDiff getLocalChange()
Description copied from interface:IThreeWayDiffReturn the local change associated with this delta. If there is no local change, either a delta with kindIDiff.NO_CHANGEis returned ornullmay be returned.- Specified by:
getLocalChangein interfaceIThreeWayDiff- Returns:
- the local change associated with this delta or
null
-
getRemoteChange
public ITwoWayDiff getRemoteChange()
Description copied from interface:IThreeWayDiffReturn the remote change associated with this delta. If there is no remote change, either a delta with kindIDiff.NO_CHANGEis returned ornullmay be returned.- Specified by:
getRemoteChangein interfaceIThreeWayDiff- Returns:
- the remote change associated with this delta or
null
-
getDirection
public int getDirection()
Description copied from interface:IThreeWayDiffReturn the direction of this three-way delta.- Specified by:
getDirectionin interfaceIThreeWayDiff- Returns:
- the direction of this three-way delta
- See Also:
IThreeWayDiff.INCOMING,IThreeWayDiff.OUTGOING,IThreeWayDiff.CONFLICTING
-
toDiffString
public String toDiffString()
Description copied from interface:IDiffReturn a string that describes the difference represented by this node.- Specified by:
toDiffStringin interfaceIDiff- Overrides:
toDiffStringin classDiff- Returns:
- a string that describes the difference represented by this node
-
-