Package net.sf.statcvs.input
Class CommitListBuilder
java.lang.Object
net.sf.statcvs.input.CommitListBuilder
Takes a set of revisions, and builds a
List
of
Commit
s from it. The result list is sorted by date.
The implementation allows for a tolerance of several minutes
between individual file commits, but author and message must be identical.- Version:
- $Id: CommitListBuilder.java,v 1.5 2008/04/02 11:22:15 benoitx Exp $
- Author:
- Richard Cyganiak
-
Constructor Summary
ConstructorsConstructorDescriptionCommitListBuilder
(Iterator revisions) CommitListBuilder
(SortedSet revisions) Creates a new instance using the given set ofRevision
s. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addNewCommit
(Revision rev) protected void
addRevToCommit
(Commit commit, Revision rev) Creates aList
ofCommit
s from the source iterator.static boolean
isInTimeFrame
(Commit commit, Date date) Returnstrue
if the date lies within the timespan of the commit, plus/minus a tolerance.static boolean
isSameCommit
(Commit commit, Revision rev) Returnstrue
if change is part of the commit, that is if they have the same author, the same message, and are within the same timeframe.protected void
processRevision
(Revision rev)
-
Constructor Details
-
Method Details
-
createCommitList
Creates aList
ofCommit
s from the source iterator. The result list will be sorted by date.- Returns:
- a new list of
Commit
objects
-
processRevision
-
addNewCommit
-
addRevToCommit
-
isSameCommit
Returnstrue
if change is part of the commit, that is if they have the same author, the same message, and are within the same timeframe.- Parameters:
commit
- the commitrev
- the revision to check against this commit- Returns:
true
if change is part of this commit
-
isInTimeFrame
Returnstrue
if the date lies within the timespan of the commit, plus/minus a tolerance.- Parameters:
date
- the date to check against this commit- Returns:
true
if the date lies within the timespan of the commit
-