Record Class GitVersion
java.lang.Object
java.lang.Record
io.jenkins.plugins.gitversionmonitor.GitVersion
-
Constructor Summary
ConstructorsConstructorDescriptionGitVersion(Integer major, Integer minor, Integer patch, Integer build) Creates an instance of aGitVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the value of thebuildrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.major()Returns the value of themajorrecord component.minor()Returns the value of theminorrecord component.static GitVersionstatic @Nullable GitVersionParse a raw version string into a GitVersion object.patch()Returns the value of thepatchrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
GitVersion
Creates an instance of aGitVersionrecord class.- Parameters:
major- the value for themajorrecord componentminor- the value for theminorrecord componentpatch- the value for thepatchrecord componentbuild- the value for thebuildrecord component
-
-
Method Details
-
of
-
parse
Parse a raw version string into a GitVersion object.- Parameters:
version- the version string from the "git --version" command- Returns:
- a GitVersion object containing the parsed version information
-
toString
-
hashCode
-
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). -
major
Returns the value of themajorrecord component.- Returns:
- the value of the
majorrecord component
-
minor
Returns the value of theminorrecord component.- Returns:
- the value of the
minorrecord component
-
patch
Returns the value of thepatchrecord component.- Returns:
- the value of the
patchrecord component
-
build
Returns the value of thebuildrecord component.- Returns:
- the value of the
buildrecord component
-