Klasse RepositoryStatistics
java.lang.Object
io.jenkins.plugins.forensics.miner.RepositoryStatistics
- Alle implementierten Schnittstellen:
Serializable
Provides access to the SCM commit statistics of all repository files up to a specific commit.
- Autor:
- Ullrich Hafner
- Siehe auch:
-
Konstruktorübersicht
KonstruktorBeschreibungCreates an empty instance ofRepositoryStatistics
with no latest commit ID set.RepositoryStatistics
(String latestCommitId) Creates an empty instance ofRepositoryStatistics
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
add
(FileStatistics additionalStatistics) Adds the additional file statistics instance.void
addAll
(RepositoryStatistics additionalStatistics) Adds all additional file statistics.void
addAll
(Collection<FileStatistics> additionalStatistics) Adds all additional file statistics.void
addAll
(List<CommitDiffItem> commits) Adds and inspects the specified commits.boolean
Returns whether the specified file is part of the repository.boolean
Returns the statistics for the specified file.getFiles()
Returns the absolute file names of the files that are part of the repository.Returns the statistics for all repository files.Returns the ID of the latest commit mined.Returns the mapping of file names to statistics.int
int
int
hashCode()
boolean
Returns whether the latest commit ID has been set.boolean
isEmpty()
Returns whether the repository is empty.protected Object
Called after de-serialization to retain backward compatibility.int
size()
Returns the number of files in the repository.protected Object
Called before serialization to fill the fileStatistics field.
-
Konstruktordetails
-
RepositoryStatistics
public RepositoryStatistics()Creates an empty instance ofRepositoryStatistics
with no latest commit ID set. -
RepositoryStatistics
Creates an empty instance ofRepositoryStatistics
.- Parameter:
latestCommitId
- the ID of the latest commit that
-
-
Methodendetails
-
readResolve
Called after de-serialization to retain backward compatibility.- Gibt zurück:
- this
-
writeReplace
Called before serialization to fill the fileStatistics field.- Gibt zurück:
- this
-
isEmpty
public boolean isEmpty()Returns whether the repository is empty.- Gibt zurück:
true
if the repository is empty,false
otherwise
-
getLatestCommitId
Returns the ID of the latest commit mined.- Gibt zurück:
- ID of the latest commit.
-
hasLatestCommitId
public boolean hasLatestCommitId()Returns whether the latest commit ID has been set.- Gibt zurück:
true
if the latest commit ID has been set,false
otherwise
-
size
public int size()Returns the number of files in the repository.- Gibt zurück:
- number of files in the repository
-
contains
Returns whether the specified file is part of the repository.- Parameter:
fileName
- the name of the file- Gibt zurück:
true
if the file file is part of the repository,false
otherwise
-
getFiles
Returns the absolute file names of the files that are part of the repository.- Gibt zurück:
- the file names
-
getFileStatistics
Returns the statistics for all repository files.- Gibt zurück:
- the statistics
-
getMapping
Returns the mapping of file names to statistics.- Gibt zurück:
- the mapping of file names to statistics
-
get
Returns the statistics for the specified file.- Parameter:
fileName
- absolute file name- Gibt zurück:
- the statistics for that file
- Löst aus:
NoSuchElementException
- if the file name is not registered
-
addAll
Adds and inspects the specified commits.- Parameter:
commits
- the additional commits
-
addAll
Adds all additional file statistics.- Parameter:
additionalStatistics
- the additional statistics to add
-
addAll
Adds all additional file statistics.- Parameter:
additionalStatistics
- the additional statistics to add
-
add
Adds the additional file statistics instance.- Parameter:
additionalStatistics
- the additional statistics to add
-
getTotalChurn
public int getTotalChurn() -
getTotalLinesOfCode
public int getTotalLinesOfCode() -
getLatestStatistics
-
equals
-
hashCode
public int hashCode()
-