Record Class BlameLine

java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.BlameLine
Record Components:
line - the number of the line in the file as it is in the blamed commit, starting at 1
commitId - the full id of the commit that last changed the line
originalLine - the number of the line in that commit (the line may have moved since), starting at 1
originalPath - the path of the file in that commit (differs from the blamed path after a rename)
authorName - the author of that commit
authorEmail - the e-mail address of the author
time - when the author made that commit
summary - the first line of the message of that commit
text - the text of the line, without the line ending

public record BlameLine(int line, String commitId, int originalLine, String originalPath, String authorName, String authorEmail, Instant time, String summary, String text) extends Record
One line of a blamed file (feature 47): its text and the commit that last changed it.
  • Constructor Details

    • BlameLine

      public BlameLine(int line, String commitId, int originalLine, String originalPath, String authorName, String authorEmail, Instant time, String summary, String text)
      Creates an instance of a BlameLine record class.
      Parameters:
      line - the value for the line record component
      commitId - the value for the commitId record component
      originalLine - the value for the originalLine record component
      originalPath - the value for the originalPath record component
      authorName - the value for the authorName record component
      authorEmail - the value for the authorEmail record component
      time - the value for the time record component
      summary - the value for the summary record component
      text - the value for the text record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • line

      public int line()
      Returns the value of the line record component.
      Returns:
      the value of the line record component
    • commitId

      public String commitId()
      Returns the value of the commitId record component.
      Returns:
      the value of the commitId record component
    • originalLine

      public int originalLine()
      Returns the value of the originalLine record component.
      Returns:
      the value of the originalLine record component
    • originalPath

      public String originalPath()
      Returns the value of the originalPath record component.
      Returns:
      the value of the originalPath record component
    • authorName

      public String authorName()
      Returns the value of the authorName record component.
      Returns:
      the value of the authorName record component
    • authorEmail

      public String authorEmail()
      Returns the value of the authorEmail record component.
      Returns:
      the value of the authorEmail record component
    • time

      public Instant time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • summary

      public String summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component