Class Blames

java.lang.Object
io.jenkins.plugins.forensics.blame.Blames
All Implemented Interfaces:
Serializable

public class Blames extends Object implements Serializable
Provides access to the blame information for a collection of workspace files. File names must use absolute paths. Additionally, info and error messages during the SCM processing can be stored.
Author:
Ullrich Hafner
See Also:
  • Constructor Details

    • Blames

      public Blames()
  • Method Details

    • add

      public void add(FileBlame additionalBlame)
      Adds the specified blame to this collection of blames.
      Parameters:
      additionalBlame - the blame to add
    • addAll

      public void addAll(Blames other)
      Merges all specified blames with the current collection of blames.
      Parameters:
      other - the blames to add
    • isEmpty

      public boolean isEmpty()
      Returns whether there are files with blames.
      Returns:
      true if there a no blames available, false otherwise
    • size

      public int size()
      Returns the number of files with blames.
      Returns:
      number of affected files with blames
    • contains

      public boolean contains(String fileName)
      Returns whether there are blames for the specified file.
      Parameters:
      fileName - the relative or absolute path of the file
      Returns:
      true if the file already has been added, false otherwise
    • getFiles

      public Set<String> getFiles()
      Returns all files with blames.
      Returns:
      the files with blames
    • getBlame

      public FileBlame getBlame(String fileName)
      Returns the blame information for the specified file.
      Parameters:
      fileName - the absolute path of the file
      Returns:
      the blame information for the specified file.
      Throws:
      NoSuchElementException - if the file name is not registered
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object