Record Class StashOptions
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.StashOptions
- Record Components:
includeUntracked- also stash files that git does not know yetkeepIndex- leave the staged changes staged (and in the working tree) after they are stashed (--keep-index); needsCapability.STASH_OPTIONSpaths- stash only these files (paths relative to the work tree); empty = everything; needsCapability.STASH_OPTIONS
public record StashOptions(boolean includeUntracked, boolean keepIndex, List<String> paths)
extends Record
What a stash takes and what it leaves.
-
Constructor Summary
ConstructorsConstructorDescriptionStashOptions(boolean includeUntracked, boolean keepIndex, List<String> paths) Creates an instance of aStashOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static StashOptionsEverything, untracked files included: what the Stash button did before it had a dialog.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludeUntrackedrecord component.booleanReturns the value of thekeepIndexrecord component.booleanWhether the stash needs more than the plaingit stash: it keeps the index or takes only some paths.paths()Returns the value of thepathsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StashOptions
Creates an instance of aStashOptionsrecord class.- Parameters:
includeUntracked- the value for theincludeUntrackedrecord componentkeepIndex- the value for thekeepIndexrecord componentpaths- the value for thepathsrecord component
-
-
Method Details
-
everything
Everything, untracked files included: what the Stash button did before it had a dialog. -
needsOptions
public boolean needsOptions()Whether the stash needs more than the plaingit stash: it keeps the index or takes only some paths. -
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 '=='. -
includeUntracked
public boolean includeUntracked()Returns the value of theincludeUntrackedrecord component.- Returns:
- the value of the
includeUntrackedrecord component
-
keepIndex
public boolean keepIndex()Returns the value of thekeepIndexrecord component.- Returns:
- the value of the
keepIndexrecord component
-
paths
Returns the value of thepathsrecord component.- Returns:
- the value of the
pathsrecord component
-