org.tmatesoft.svn.core

Class SVNLogEntryPath

public class SVNLogEntryPath extends Object implements 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.

Version: 1.1.1

Author: TMate Software Ltd.

See Also: SVNLogEntry

Field Summary
static charTYPE_ADDED
Char 'A' (item added).
static charTYPE_DELETED
Char 'D' (item deleted).
static charTYPE_MODIFIED
Char 'M' (item modified).
static charTYPE_REPLACED
Char 'R' (item replaced).
Constructor Summary
SVNLogEntryPath(String path, char type, String copyPath, long copyRevision)
Constructs an SVNLogEntryPath object.
Method Summary
booleanequals(Object obj)
Compares this object with another one.
StringgetCopyPath()
Returns the path of the ancestor of the item represented by this object.
longgetCopyRevision()
Returns the revision of the ancestor of the item represented by this object.
StringgetPath()
Returns the path of the item represented by this object.
chargetType()
Gets the type of the change applied to the item represented by this object.
inthashCode()
Calculates and returns a hash code for this object.
protected voidsetChangeType(char type)
protected voidsetCopyPath(String path)
protected voidsetCopyRevision(long revision)
voidsetPath(String path)
Sets the path of the item represented by this object.
StringtoString()
Gives a string representation of this oobject.

Field Detail

TYPE_ADDED

public static final char TYPE_ADDED
Char 'A' (item added).

TYPE_DELETED

public static final char TYPE_DELETED
Char 'D' (item deleted).

TYPE_MODIFIED

public static final char TYPE_MODIFIED
Char 'M' (item modified).

TYPE_REPLACED

public static final char TYPE_REPLACED
Char 'R' (item replaced).

Constructor Detail

SVNLogEntryPath

public SVNLogEntryPath(String path, char type, String copyPath, long copyRevision)
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 revision type a type of the path change; it can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - Replaced copyPath the path of the ancestor of the item represented by path (in that case if path was copied), or null if path copyRevision the ancestor's revision if the path is a branch, or -1 if not

Method Detail

equals

public boolean equals(Object obj)
Compares this object with another one.

Parameters: obj an object to compare with

Returns: true if this object is the same as the obj argument

getCopyPath

public String 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

public String 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

hashCode

public int hashCode()
Calculates and returns a hash code for this object.

Returns: a hash code

setChangeType

protected void setChangeType(char type)

setCopyPath

protected void setCopyPath(String path)

setCopyRevision

protected void setCopyRevision(long revision)

setPath

public void setPath(String path)
Sets the path of the item represented by this object.

Parameters: path a path of an item that was changed (regarding a definite revision)

toString

public String toString()
Gives a string representation of this oobject.

Returns: a string representing this object

Copyright © 2004-2007 TMate Software Ltd. All Rights Reserved.