Record Class VersionPolicy
java.lang.Object
java.lang.Record
io.github.joke.conventionalversion.calc.VersionPolicy
- Record Components:
initialVersion- release-pleaseinitial-versionbumpMinorPreMajor- release-pleasebump-minor-pre-majorbumpPatchForMinorPreMajor- release-pleasebump-patch-for-minor-pre-major
- All Implemented Interfaces:
Serializable
public record VersionPolicy(SemanticVersion initialVersion, boolean bumpMinorPreMajor, boolean bumpPatchForMinorPreMajor)
extends Record
implements Serializable
The inputs that change the calculated number, named after their release-please counterparts so a
divergence between the two configurations is greppable.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVersionPolicy(SemanticVersion initialVersion, boolean bumpMinorPreMajor, boolean bumpPatchForMinorPreMajor) Creates an instance of aVersionPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thebumpMinorPreMajorrecord component.booleanReturns the value of thebumpPatchForMinorPreMajorrecord component.static VersionPolicydefaults()release-please's defaults.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VersionPolicy
public VersionPolicy(SemanticVersion initialVersion, boolean bumpMinorPreMajor, boolean bumpPatchForMinorPreMajor) Creates an instance of aVersionPolicyrecord class.- Parameters:
initialVersion- the value for theinitialVersionrecord componentbumpMinorPreMajor- the value for thebumpMinorPreMajorrecord componentbumpPatchForMinorPreMajor- the value for thebumpPatchForMinorPreMajorrecord component
-
-
Method Details
-
defaults
release-please's defaults. The initial version is1.0.0rather than0.1.0because that is what release-please actually cuts for a first release. -
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. -
initialVersion
Returns the value of theinitialVersionrecord component.- Returns:
- the value of the
initialVersionrecord component
-
bumpMinorPreMajor
public boolean bumpMinorPreMajor()Returns the value of thebumpMinorPreMajorrecord component.- Returns:
- the value of the
bumpMinorPreMajorrecord component
-
bumpPatchForMinorPreMajor
public boolean bumpPatchForMinorPreMajor()Returns the value of thebumpPatchForMinorPreMajorrecord component.- Returns:
- the value of the
bumpPatchForMinorPreMajorrecord component
-