Record Class CommitInfo
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.CommitInfo
public record CommitInfo(String id, String summary, String authorName, String authorEmail, Instant authorTime, List<String> parentIds)
extends Record
A commit as shown in the history.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthorEmailrecord component.Returns the value of theauthorNamerecord component.Returns the value of theauthorTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanisMerge()Whether the commit joins branches, i.e. has more than one parent.Returns the value of theparentIdsrecord component.shortId()Abbreviated commit id (first 7 characters).summary()Returns the value of thesummaryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommitInfo
public CommitInfo(String id, String summary, String authorName, String authorEmail, Instant authorTime, List<String> parentIds) Creates an instance of aCommitInforecord class.- Parameters:
id- the value for theidrecord componentsummary- the value for thesummaryrecord componentauthorName- the value for theauthorNamerecord componentauthorEmail- the value for theauthorEmailrecord componentauthorTime- the value for theauthorTimerecord componentparentIds- the value for theparentIdsrecord component
-
-
Method Details
-
shortId
Abbreviated commit id (first 7 characters). -
isMerge
public boolean isMerge()Whether the commit joins branches, i.e. has more than one parent. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord 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
-
authorTime
Returns the value of theauthorTimerecord component.- Returns:
- the value of the
authorTimerecord component
-
parentIds
Returns the value of theparentIdsrecord component.- Returns:
- the value of the
parentIdsrecord component
-