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 1commitId- the full id of the commit that last changed the lineoriginalLine- the number of the line in that commit (the line may have moved since), starting at 1originalPath- the path of the file in that commit (differs from the blamed path after a rename)- the author of that commit- the e-mail address of the authortime- when the author made that commitsummary- the first line of the message of that committext- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthorEmailrecord component.Returns the value of theauthorNamerecord component.commitId()Returns the value of thecommitIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intline()Returns the value of thelinerecord component.intReturns the value of theoriginalLinerecord component.Returns the value of theoriginalPathrecord component.summary()Returns the value of thesummaryrecord component.text()Returns the value of thetextrecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aBlameLinerecord class.- Parameters:
line- the value for thelinerecord componentcommitId- the value for thecommitIdrecord componentoriginalLine- the value for theoriginalLinerecord componentoriginalPath- the value for theoriginalPathrecord componentauthorName- the value for theauthorNamerecord componentauthorEmail- the value for theauthorEmailrecord componenttime- the value for thetimerecord componentsummary- the value for thesummaryrecord componenttext- the value for thetextrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
commitId
Returns the value of thecommitIdrecord component.- Returns:
- the value of the
commitIdrecord component
-
originalLine
public int originalLine()Returns the value of theoriginalLinerecord component.- Returns:
- the value of the
originalLinerecord component
-
originalPath
Returns the value of theoriginalPathrecord component.- Returns:
- the value of the
originalPathrecord component
-
authorName
Returns the value of theauthorNamerecord component.- Returns:
- the value of the
authorNamerecord component
-
authorEmail
Returns the value of theauthorEmailrecord component.- Returns:
- the value of the
authorEmailrecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-