Record Class BackupInfo
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.BackupInfo
- Record Components:
ref- the full name, e.g.refs/stemma/reset/20260301-091500-123commitId- the backup commitheadId- the commit that was checked out when the backup was made; empty if the repository had no commitcreated- when it was mademessage- what the backup says it was made for
public record BackupInfo(String ref, String commitId, String headId, Instant created, String message)
extends Record
A backup written by
GitRepository.createBackup(java.lang.String, java.lang.String): a commit under refs/stemma/<kind>/<time> whose tree is the
whole working tree (changed and untracked files, without ignored ones) at that moment, and whose parent is the commit that was
checked out then.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncommitId()Returns the value of thecommitIdrecord component.created()Returns the value of thecreatedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headId()Returns the value of theheadIdrecord component.message()Returns the value of themessagerecord component.ref()Returns the value of therefrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BackupInfo
Creates an instance of aBackupInforecord class.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
ref
Returns the value of therefrecord component.- Returns:
- the value of the
refrecord component
-
commitId
Returns the value of thecommitIdrecord component.- Returns:
- the value of the
commitIdrecord component
-
headId
Returns the value of theheadIdrecord component.- Returns:
- the value of the
headIdrecord component
-
created
Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-