net.sf.statcvs.model
Class Commit
- Comparable
public class Commit
implements Comparable
Represents a commit, which may consist of several
Revision
objects. A commit means that several files were committed at once by the
same author with the same message.
TODO: Rename getAuthor() to getLogin(), getAffectedFiles() to getAffectedFileNames() (or change to return CvsFiles?)
$Id: Commit.java,v 1.16 2008/04/02 11:22:16 benoitx Exp $Commit(Revision revision) - Creates a new instance which consists of the given revision.
|
void | addRevision(Revision revision) - Adds a revision to the commit.
|
int | compareTo(Object other) - Compares this commit to another revision, based on their date.
|
Set | getAffectedFiles() - Returns a
String Set containing all filenames
which were affected by this Commit .
|
Author | getAuthor() - Returns the author of the commit.
|
String | getComment() - Returns the comment of the commit.
|
Date | getDate() - Returns the date when the commit took place.
|
Set | getRevisions() - Returns the
Revision objects that make up this commit.
|
Commit
public Commit(Revision revision)
Creates a new instance which consists of the given revision.
revision
- the single revision out of which the commit will
be created
addRevision
public void addRevision(Revision revision)
Adds a revision to the commit. The revision must be part of the
commit, that is, it must have the same date, author and message
as all other revisions in the commit.
revision
- the Revision
to add.
compareTo
public int compareTo(Object other)
Compares this commit to another revision, based on their date.
getAffectedFiles
public Set getAffectedFiles()
Returns a String
Set
containing all filenames
which were affected by this Commit
.
getAuthor
public Author getAuthor()
Returns the author of the commit.
getComment
public String getComment()
Returns the comment of the commit.
getDate
public Date getDate()
Returns the date when the commit took place. The implementation
simply returns the timestamp of the first change of the commit.
- a date within the timeframe of the commit
getRevisions
public Set getRevisions()
Returns the
Revision
objects that make up this commit.
- a set of Revision instances