|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.statcvs.model.Commit
Encapsulates a CVS commit, which may consist of several CvsRevision
objects (several files committed at once by the same author with the same
message). The implementation allows for a tolerance of several minutes
between individual file commits, but author and message must be identical.
Constructor Summary | |
Commit(CvsRevision revision)
Creates a new instance which consists of the given revision. |
Method Summary | |
void |
addRevision(CvsRevision change)
Adds a revision to the commit. |
java.util.Set |
getAffectedFiles()
Returns a String Set containing all filenames
which were affected by this Commit . |
Author |
getAuthor()
Returns the author of the commit |
int |
getChangeCount()
Returns the number of individual changes which make up this commit. |
java.lang.String |
getComment()
Returns the comment of the commit |
java.util.Date |
getDate()
Returns the date when the commit took place. |
java.util.List |
getRevisions()
Returns a list of CvsRevision objects, which make up this commit.
|
boolean |
isInTimeFrame(java.util.Date date)
Returns true if the date lies within the timespan of
the commit, plus/minus a tolerance. |
boolean |
isSameCommit(CvsRevision change)
Returns true if change is part of this commit, that is if
they have the same author, the same message, and are within the same
timeframe. |
boolean |
overlaps(Commit commit)
Returns true if two commits overlap and should be merged. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Commit(CvsRevision revision)
revision
- the single revision out of which the commit will be createdMethod Detail |
public Author getAuthor()
public java.lang.String getComment()
public boolean isSameCommit(CvsRevision change)
true
if change is part of this commit, that is if
they have the same author, the same message, and are within the same
timeframe.
change
- the revision to check against this commit
true
if change is part of this commitpublic boolean isInTimeFrame(java.util.Date date)
true
if the date lies within the timespan of
the commit, plus/minus a tolerance.
date
- the date to check against this commit
true
if the date lies within the timespan of the commitpublic boolean overlaps(Commit commit)
true
if two commits overlap and should be merged.
commit
- the commit to check
true
if two commits overlappublic void addRevision(CvsRevision change)
change
- the CvsRevision
to add.public java.util.List getRevisions()
CvsRevision
objects, which make up this commit.
May be used to access the individual files which were changed by the commit.
public java.util.Set getAffectedFiles()
String
Set
containing all filenames
which were affected by this Commit
.
Set
of String
spublic int getChangeCount()
public java.util.Date getDate()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |