Klasse RepositoryStatistics

java.lang.Object
io.jenkins.plugins.forensics.miner.RepositoryStatistics
Alle implementierten Schnittstellen:
Serializable

public class RepositoryStatistics extends Object implements Serializable
Provides access to the SCM commit statistics of all repository files up to a specific commit.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • RepositoryStatistics

      public RepositoryStatistics()
      Creates an empty instance of RepositoryStatistics with no latest commit ID set.
    • RepositoryStatistics

      public RepositoryStatistics(String latestCommitId)
      Creates an empty instance of RepositoryStatistics.
      Parameter:
      latestCommitId - the ID of the latest commit that
  • Methodendetails

    • readResolve

      protected Object readResolve()
      Called after de-serialization to retain backward compatibility.
      Gibt zurück:
      this
    • writeReplace

      protected Object 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

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

      public boolean contains(String fileName)
      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

      public Set<String> getFiles()
      Returns the absolute file names of the files that are part of the repository.
      Gibt zurück:
      the file names
    • getFileStatistics

      public Collection<FileStatistics> getFileStatistics()
      Returns the statistics for all repository files.
      Gibt zurück:
      the statistics
    • getMapping

      public Map<String,FileStatistics> getMapping()
      Returns the mapping of file names to statistics.
      Gibt zurück:
      the mapping of file names to statistics
    • get

      public FileStatistics get(String fileName)
      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

      public void addAll(List<CommitDiffItem> commits)
      Adds and inspects the specified commits.
      Parameter:
      commits - the additional commits
    • addAll

      public void addAll(Collection<FileStatistics> additionalStatistics)
      Adds all additional file statistics.
      Parameter:
      additionalStatistics - the additional statistics to add
    • addAll

      public void addAll(RepositoryStatistics additionalStatistics)
      Adds all additional file statistics.
      Parameter:
      additionalStatistics - the additional statistics to add
    • add

      public void add(FileStatistics additionalStatistics)
      Adds the additional file statistics instance.
      Parameter:
      additionalStatistics - the additional statistics to add
    • getTotalChurn

      public int getTotalChurn()
    • getTotalLinesOfCode

      public int getTotalLinesOfCode()
    • getLatestStatistics

      public CommitStatistics getLatestStatistics()
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object