public class SemanticVersion extends java.lang.Object implements java.lang.Comparable<SemanticVersion>
Constructor and Description |
---|
SemanticVersion(java.lang.String version)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SemanticVersion o) |
java.lang.String |
getVersion() |
static boolean |
isAtLeast(java.lang.String version,
java.lang.String requiredVersion)
Check whether the version is at least the given version.
|
static boolean |
isAtLeastMajorMinor(java.lang.String version,
int majorVersion,
int minorVersion)
Check whether the current version is at least the given major and minor version.
|
public SemanticVersion(java.lang.String version)
version
- versionpublic java.lang.String getVersion()
public int compareTo(SemanticVersion o)
compareTo
in interface java.lang.Comparable<SemanticVersion>
public static boolean isAtLeastMajorMinor(java.lang.String version, int majorVersion, int minorVersion)
version
- The version to checkmajorVersion
- The major versionminorVersion
- The minor versionpublic static boolean isAtLeast(java.lang.String version, java.lang.String requiredVersion)
version
- The versionrequiredVersion
- The required version