Class Diff
java.lang.Object
org.eclipse.team.core.diff.provider.Diff
- All Implemented Interfaces:
IDiff
- Direct Known Subclasses:
ThreeWayDiff
,TwoWayDiff
Abstract implementation of
IDiff
that can be subclassed by
clients.- Since:
- 3.2
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant (bit mask) that defines the area of the status that is reserved for use by this abstract class for encoding the kind of the diff. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getKind()
Returns the kind of this diff.getPath()
Returns the full, absolute path of the object to which the diff applies with respect to the model root.final int
Return the status of the diff node.int
hashCode()
Return a string that describes the difference represented by this node.
-
Field Details
-
KIND_MASK
public static final int KIND_MASKConstant (bit mask) that defines the area of the status that is reserved for use by this abstract class for encoding the kind of the diff.- See Also:
-
-
Constructor Details
-
Diff
Create a diff node.- Parameters:
path
- the path of the diffstatus
- the status of the diff. The kind should be encoded in the status along with any additional flags required by a subclass.
-
-
Method Details
-
getPath
Description copied from interface:IDiff
Returns the full, absolute path of the object to which the diff applies with respect to the model root.Note: the returned path never has a trailing separator.
-
getKind
public int getKind()Description copied from interface:IDiff
Returns the kind of this diff. Normally, one ofADDED
,REMOVED
,CHANGED
. -
getStatus
public final int getStatus()Return the status of the diff node. The status is a bit field that contains the kind and any additional status information that subclasses need to encode. The first byte of the status is reserved for use by this abstract class as indicated by theKIND_MASK
.- Returns:
- the status of the diff node
-
toDiffString
Description copied from interface:IDiff
Return a string that describes the difference represented by this node.- Specified by:
toDiffString
in interfaceIDiff
- Returns:
- a string that describes the difference represented by this node
-
hashCode
public int hashCode() -
equals
-