Package org.tmatesoft.svn.core
Class SVNLogEntryPath
java.lang.Object
org.tmatesoft.svn.core.SVNLogEntryPath
- All Implemented Interfaces:
Serializable
The SVNLogEntryPath class encapsulates information about a single
item changed in a revision. This information includes an item's path, a
type of the changes made to the item, and if the item is a copy of another
one - information about the item's ancestor.
SVNLogEntryPath objects are held by an SVNLogEntry object - they are representations of all the changed paths in the revision represented by that SVNLogEntry object.
- Since:
- 1.2
- Version:
- 1.3
- Author:
- TMate Software Ltd.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final char
Char 'A' (item added).static final char
Char 'D' (item deleted).static final char
Char 'M' (item modified).static final char
Char 'R' (item replaced). -
Constructor Summary
ConstructorsConstructorDescriptionSVNLogEntryPath
(String path, char type, String copyPath, long copyRevision) Constructs an SVNLogEntryPath object.SVNLogEntryPath
(String path, char type, String copyPath, long copyRevision, SVNNodeKind kind) Constructs an SVNLogEntryPath object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this object with another one.Returns the path of the ancestor of the item represented by this object.long
Returns the revision of the ancestor of the item represented by this object.getKind()
Returns the node kind of the changed path, represented by this object.getPath()
Returns the path of the item represented by this object.char
getType()
Gets the type of the change applied to the item represented by this object.int
hashCode()
Calculates and returns a hash code for this object.protected void
setChangeType
(char type) protected void
setCopyPath
(String path) protected void
setCopyRevision
(long revision) protected void
setNodeKind
(SVNNodeKind nodeKind) void
Sets the path of the item represented by this object.toString()
Gives a string representation of this oobject.
-
Field Details
-
TYPE_ADDED
public static final char TYPE_ADDEDChar 'A' (item added).- See Also:
-
TYPE_DELETED
public static final char TYPE_DELETEDChar 'D' (item deleted).- See Also:
-
TYPE_MODIFIED
public static final char TYPE_MODIFIEDChar 'M' (item modified).- See Also:
-
TYPE_REPLACED
public static final char TYPE_REPLACEDChar 'R' (item replaced).- See Also:
-
-
Constructor Details
-
SVNLogEntryPath
Constructs an SVNLogEntryPath object.Use char constants of this class as a change
type
to pass to this constructor.- Parameters:
path
- a path that was changed in a revisiontype
- a type of the path change; it can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - ReplacedcopyPath
- the path of the ancestor of the item represented bypath
(in that case ifpath
was copied), or null ifpath
copyRevision
- the ancestor's revision if thepath
is a branch, or -1 if not
-
SVNLogEntryPath
public SVNLogEntryPath(String path, char type, String copyPath, long copyRevision, SVNNodeKind kind) Constructs an SVNLogEntryPath object.Use char constants of this class as a change
type
to pass to this constructor.- Parameters:
path
- a path that was changed in a revisiontype
- a type of the path change; it can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - ReplacedcopyPath
- the path of the ancestor of the item represented bypath
(in that case ifpath
was copied), or null ifpath
copyRevision
- the ancestor's revision if thepath
is a branch, or -1 if notkind
- node kind of the changed path- Since:
- 1.3
-
-
Method Details
-
getCopyPath
Returns the path of the ancestor of the item represented by this object.- Returns:
- the origin path from where the item, represented by this object, was copied, or null if it wasn't copied
-
getCopyRevision
public long getCopyRevision()Returns the revision of the ancestor of the item represented by this object.- Returns:
- the revision of the origin path from where the item, represented by this object, was copied, or -1 if the item was not copied
-
getPath
Returns the path of the item represented by this object.- Returns:
- the changed path represented by this object
-
getType
public char getType()Gets the type of the change applied to the item represented by this object. This type can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - Replaced (what means that the object is first deleted, then another object of the same name is added, all within a single revision).- Returns:
- a type of the change as a char label
-
getKind
Returns the node kind of the changed path, represented by this object.- Returns:
- node kind of the changed path
- Since:
- 1.3
-
setPath
Sets the path of the item represented by this object.- Parameters:
path
- a path of an item that was changed (regarding a definite revision)
-
setChangeType
protected void setChangeType(char type) -
setCopyRevision
protected void setCopyRevision(long revision) -
setCopyPath
-
setNodeKind
-
hashCode
public int hashCode()Calculates and returns a hash code for this object. -
equals
Compares this object with another one. -
toString
Gives a string representation of this oobject.
-