Class FileBlame

java.lang.Object
io.jenkins.plugins.forensics.blame.FileBlame
All Implemented Interfaces:
Serializable, Iterable<Integer>

public final class FileBlame extends Object implements Iterable<Integer>, Serializable
Stores the repository blames for several lines of a single file. File names are stored using the absolute path of the file.
Author:
Ullrich Hafner
See Also:
  • Method Details Link icon

    • getFileName Link icon

      public String getFileName()
    • getLines Link icon

      public Set<Integer> getLines()
    • iterator Link icon

      @NonNull public Iterator<Integer> iterator()
      Specified by:
      iterator in interface Iterable<Integer>
    • setCommit Link icon

      public void setCommit(int lineNumber, String id)
      Sets the commit ID for the specified line number.
      Parameters:
      lineNumber - the line number
      id - the commit ID
    • getCommit Link icon

      public String getCommit(int line)
      Returns the commit ID for the specified line.
      Parameters:
      line - the affected line
      Returns:
      the commit ID
    • setName Link icon

      public void setName(int lineNumber, String name)
      Sets the author name for the specified line number.
      Parameters:
      lineNumber - the line number
      name - the author name
    • getName Link icon

      public String getName(int line)
      Returns the author name for the specified line.
      Parameters:
      line - the affected line
      Returns:
      the author name
    • setEmail Link icon

      public void setEmail(int lineNumber, String emailAddress)
      Sets the email address for the specified line number.
      Parameters:
      lineNumber - the line number
      emailAddress - the email address of the author
    • getEmail Link icon

      public String getEmail(int line)
      Returns the author email for the specified line.
      Parameters:
      line - the affected line
      Returns:
      the author email
    • setTime Link icon

      public void setTime(int lineNumber, int time)
      Sets the modification time for the specified line. Essentially, this is the time of the last commit that changed this line.
      Parameters:
      lineNumber - the line number
      time - the time of the commit (given as number of seconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT).
    • getTime Link icon

      public int getTime(int line)
      Returns the modification time for the specified line. Essentially, this is the time of the last commit that changed this line.
      Parameters:
      line - the affected line
      Returns:
      the time of the commit (given as number of seconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.).
    • merge Link icon

      public void merge(FileBlame other)
      Merges the additional lines of the other FileBlame instance with the lines of this instance.
      Parameters:
      other - the other blames
      Throws:
      IllegalArgumentException - if the file name of the other instance does not match
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • equals Link icon

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

      public int hashCode()
      Overrides:
      hashCode in class Object