Record Class GitInstallation
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.cli.GitInstallation
- Record Components:
executable- absolute path of the git executableversion- parsed versionversionOutput- the complete first line ofgit --version, e.g.git version 2.39.3 (Apple Git-145)origin- where it was found, e.g.PATH,Well-known locationorConfigured
public record GitInstallation(Path executable, GitVersion version, String versionOutput, String origin)
extends Record
A validated git executable.
-
Constructor Summary
ConstructorsConstructorDescriptionGitInstallation(Path executable, GitVersion version, String versionOutput, String origin) Creates an instance of aGitInstallationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutablerecord component.final inthashCode()Returns a hash code value for this object.booleanWhether this git is recent enough for the CLI backend.label()One-line description for lists in the UI.origin()Returns the value of theoriginrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.Returns the value of theversionOutputrecord component.
-
Constructor Details
-
GitInstallation
Creates an instance of aGitInstallationrecord class.- Parameters:
executable- the value for theexecutablerecord componentversion- the value for theversionrecord componentversionOutput- the value for theversionOutputrecord componentorigin- the value for theoriginrecord component
-
-
Method Details
-
isSupported
public boolean isSupported()Whether this git is recent enough for the CLI backend. -
label
One-line description for lists in the UI. -
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). -
executable
Returns the value of theexecutablerecord component.- Returns:
- the value of the
executablerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
versionOutput
Returns the value of theversionOutputrecord component.- Returns:
- the value of the
versionOutputrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-