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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintcompareTo(SemanticVersion ver) booleanfeature()inthashCode()voidJust add one to the build number part of the version.voidJust add one to the major part of the version.voidJust add one to the minor part of the version.voidJust add one to the patch part of the version.booleanisValid()intmajor()intminor()static SemanticVersionParse a version string to produce a Semantic Version object.intpatch()toString()static SemanticVersionwithNoBuildNumber(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:
compareToin interfaceComparable<SemanticVersion>
-
isValid
public boolean isValid() -
toString
-
hashCode
-
equals
-