Record Class StashDetails
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.StashDetails
- Record Components:
commitId- the stash commit: askGitRepository.diff(io.github.jbastgen.stemma.git.api.DiffTarget, java.lang.String)forDiffTarget.OfCommitof it to see a tracked fileuntrackedCommitId- the commit of the untracked files (every file in it is new), empty when none were stashedfiles- the tracked files that changed (staged and unstaged together)untrackedFiles- the untracked files that were stashed
public record StashDetails(String commitId, String untrackedCommitId, List<ChangedFile> files, List<ChangedFile> untrackedFiles)
extends Record
What a stash holds, to show it like a commit. A stash is a commit on top of the commit it was made on; its changes against that commit are
the tracked files. Untracked files, when they were stashed, are in a commit of their own (a third parent).
-
Constructor Summary
ConstructorsConstructorDescriptionStashDetails(String commitId, String untrackedCommitId, List<ChangedFile> files, List<ChangedFile> untrackedFiles) Creates an instance of aStashDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommitId()Returns the value of thecommitIdrecord component.final booleanIndicates whether some other object is "equal to" this one.files()Returns the value of thefilesrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Returns the value of theuntrackedCommitIdrecord component.Returns the value of theuntrackedFilesrecord component.
-
Constructor Details
-
StashDetails
public StashDetails(String commitId, String untrackedCommitId, List<ChangedFile> files, List<ChangedFile> untrackedFiles) Creates an instance of aStashDetailsrecord class.- Parameters:
commitId- the value for thecommitIdrecord componentuntrackedCommitId- the value for theuntrackedCommitIdrecord componentfiles- the value for thefilesrecord componentuntrackedFiles- the value for theuntrackedFilesrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
commitId
Returns the value of thecommitIdrecord component.- Returns:
- the value of the
commitIdrecord component
-
untrackedCommitId
Returns the value of theuntrackedCommitIdrecord component.- Returns:
- the value of the
untrackedCommitIdrecord component
-
files
Returns the value of thefilesrecord component.- Returns:
- the value of the
filesrecord component
-
untrackedFiles
Returns the value of theuntrackedFilesrecord component.- Returns:
- the value of the
untrackedFilesrecord component
-