Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.team.core.diff.provider
Class Diff

java.lang.Object
  extended by 
org.eclipse.team.core.diff.provider.Diff
All Implemented Interfaces:
IDiff
Direct Known Subclasses:
ThreeWayDiff, TwoWayDiff

public abstract class Diff
extends Object
implements IDiff

Abstract implementation of IDiff that can be subclassed by clients.

Since:
3.2
See Also:
ITwoWayDiff, IThreeWayDiff

Field Summary
static int KIND_MASK
          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.
 
Fields inherited from interface org.eclipse.team.core.diff. IDiff
ADD, CHANGE, NO_CHANGE, REMOVE
 
Constructor Summary
protected Diff ( IPath path, int status)
          Create a diff node.
 
Method Summary
 boolean equals ( Object obj)
           
 int getKind ()
          Returns the kind of this diff.
  IPath getPath ()
          Returns the full, absolute path of the object to which the diff applies with respect to the model root.
 int getStatus ()
          Return the status of the diff node.
 int hashCode ()
           
  String toDiffString ()
          Return a string that describes the difference represented by this node.
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KIND_MASK

public static final int KIND_MASK
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.

See Also:
getStatus(), Constant Field Values
Constructor Detail

Diff

protected Diff(
IPath path,
               int status)
Create a diff node.

Parameters:
path - the path of the diff
status - the status of the diff. The kind should be encoded in the status along with any additional flags required by a subclass.
Method Detail

getPath

public 
IPath 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.

Specified by:
getPath in interface IDiff
Returns:
the full, absolute path of this diff

getKind

public int getKind()
Description copied from interface: IDiff
Returns the kind of this diff. Normally, one of ADDED, REMOVED, CHANGED.

Specified by:
getKind in interface IDiff
Returns:
the kind of this diff
See Also:
IDiff.ADD, IDiff.REMOVE, IDiff.CHANGE

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 the KIND_MASK.

Returns:
the status of the diff node

toDiffString

public 
String toDiffString()
Description copied from interface: IDiff
Return a string that describes the difference represented by this node.

Specified by:
toDiffString in interface IDiff
Returns:
a string that describes the difference represented by this node

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(
Object obj)
Overrides:
equals in class Object

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire