Record Class Commit
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.model.Commit
- Record Components:
files- changed files, ornullwhen not known (the UI then shows sample files)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.body()Returns the value of thebodyrecord component.date()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.files()Returns the value of thefilesrecord component.fullSha()The full 40 character id.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.parents()Returns the value of theparentsrecord component.refs()Returns the value of therefsrecord component.sha()Returns the value of thesharecord component.subject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.The same commit with other refs: branches, tags and remotes pointing to it.
-
Constructor Details
-
Commit
public Commit(String id, String sha, String subject, String body, Author author, String date, List<Ref> refs, List<String> parents, List<FileChange> files) Creates an instance of aCommitrecord class.- Parameters:
id- the value for theidrecord componentsha- the value for thesharecord componentsubject- the value for thesubjectrecord componentbody- the value for thebodyrecord componentauthor- the value for theauthorrecord componentdate- the value for thedaterecord componentrefs- the value for therefsrecord componentparents- the value for theparentsrecord componentfiles- the value for thefilesrecord component
-
-
Method Details
-
withRefs
The same commit with other refs: branches, tags and remotes pointing to it. -
fullSha
The full 40 character id. Sample commits only carry a short id, which is padded for display. -
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
-
sha
Returns the value of thesharecord component.- Returns:
- the value of the
sharecord component
-
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
refs
Returns the value of therefsrecord component.- Returns:
- the value of the
refsrecord component
-
parents
Returns the value of theparentsrecord component.- Returns:
- the value of the
parentsrecord component
-
files
Returns the value of thefilesrecord component.- Returns:
- the value of the
filesrecord component
-