Record Class GitVersionInfo
java.lang.Object
java.lang.Record
io.jenkins.plugins.gitversionmonitor.GitVersionInfo
- Record Components:
version- the parsed version, shown in the columnfull- the version as Git reports it, e.g.2.50.0.windows.1, shown as a tooltip
- All Implemented Interfaces:
Serializable
@NullMarked
public record GitVersionInfo(GitVersion version, String full)
extends Record
implements Serializable
The Git version of a node, parsed once on the node itself.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGitVersionInfo(GitVersion version, String full) Creates an instance of aGitVersionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.full()Returns the value of thefullrecord component.final inthashCode()Returns a hash code value for this object.static @Nullable GitVersionInfoParse the output ofgit --version.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Method Details
-
parse
Parse the output ofgit --version.- Returns:
- the version, or null if the output is not recognized
-
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). -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
full
Returns the value of thefullrecord component.- Returns:
- the value of the
fullrecord component
-