Package org.ek9lang.core
Class SemanticVersion
java.lang.Object
org.ek9lang.core.SemanticVersion
- All Implemented Interfaces:
Comparable<SemanticVersion>
Can be a normal version number like 6.8.2-9 i.e 9 is the build number
Or can be for a feature like 6.1.6-specialFeature12-19 i.e. build number 19 of specialFeature12
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
compareTo
(SemanticVersion ver) boolean
feature()
int
hashCode()
void
Just add one to the build number part of the version.void
Just add one to the major part of the version.void
Just add one to the minor part of the version.void
Just add one to the patch part of the version.boolean
isValid()
int
major()
int
minor()
static SemanticVersion
Parse a version string to produce a Semantic Version object.int
patch()
toString()
static SemanticVersion
withNoBuildNumber
(String value) Parse a version string that also have a build number to produce a Semantic Version object.
-
Constructor Details
-
SemanticVersion
-
-
Method Details
-
of
Parse a version string to produce a Semantic Version object. If un-parsable then an invalid semantic version will result. -
withNoBuildNumber
Parse a version string that also have a build number to produce a Semantic Version object. If un-parsable then an invalid semantic version will result. -
major
public int major() -
incrementMajor
public void incrementMajor()Just add one to the major part of the version. But resets minor, patch and build to zero. -
minor
public int minor() -
incrementMinor
public void incrementMinor()Just add one to the minor part of the version. But resets patch and build to zero. -
patch
public int patch() -
incrementPatch
public void incrementPatch()Just add one to the patch part of the version. But resets build to zero. -
feature
-
buildNumber
public int buildNumber() -
incrementBuildNumber
public void incrementBuildNumber()Just add one to the build number part of the version. -
compareTo
- Specified by:
compareTo
in interfaceComparable<SemanticVersion>
-
isValid
public boolean isValid() -
toString
-
hashCode
public int hashCode() -
equals
-