Record Class VersionResult
java.lang.Object
java.lang.Record
io.github.joke.conventionalversion.calc.VersionResult
- Record Components:
version- the version string, bare on a release commit and-SNAPSHOTotherwisebump- what the analysed commits implied, before any override or floor was appliedreleasable- whether the range warrants a release; publishing is gated on this rather than on inferring intent fromversionsha- the commit the build was produced from, for the jar manifest rather than the coordinate
- All Implemented Interfaces:
Serializable
public record VersionResult(String version, Bump bump, boolean releasable, String sha)
extends Record
implements Serializable
The outcome of a calculation.
Serializable because this is the value a ValueSource hands back: it is stored in
the configuration cache entry and captured by the isolated action that assigns project versions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVersionResult(String version, Bump bump, boolean releasable, String sha) Creates an instance of aVersionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbump()Returns the value of thebumprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thereleasablerecord component.sha()Returns the value of thesharecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
VersionResult
Creates an instance of aVersionResultrecord class.- Parameters:
version- the value for theversionrecord componentbump- the value for thebumprecord componentreleasable- the value for thereleasablerecord componentsha- the value for thesharecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
version
-
bump
-
releasable
public boolean releasable()Returns the value of thereleasablerecord component.- Returns:
- the value of the
releasablerecord component
-
sha
-