Package io.micronaut.core.version
Class SemanticVersion
java.lang.Object
io.micronaut.core.version.SemanticVersion
- All Implemented Interfaces:
Comparable<SemanticVersion>
Utility class for comparing semantic versions.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
static boolean
Check whether the version is at least the given version.static boolean
isAtLeastMajorMinor
(String version, int majorVersion, int minorVersion) Check whether the current version is at least the given major and minor version.
-
Constructor Details
-
SemanticVersion
Constructor.- Parameters:
version
- version
-
-
Method Details
-
getVersion
- Returns:
- The version string
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SemanticVersion>
-
isAtLeastMajorMinor
Check whether the current version is at least the given major and minor version.- Parameters:
version
- The version to checkmajorVersion
- The major versionminorVersion
- The minor version- Returns:
- True if it is
-
isAtLeast
Check whether the version is at least the given version.- Parameters:
version
- The versionrequiredVersion
- The required version- Returns:
- True if it is
-