Class VersionHelper
java.lang.Object
org.sentrysoftware.metricshub.engine.common.helpers.VersionHelper
Utility class for handling MetricsHub engine version information.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareVersions(String version1, String version2) Compares the given versions.static StringReturns the project version.static booleanisVersionLessThanOtherVersion(String version, String otherVersion) Checks if the givenversionis less than the givenotherVersion.
-
Method Details
-
getClassVersion
Returns the project version.- Returns:
- The current version of the MetricsHub engine module (which is equal to the project version).
-
isVersionLessThanOtherVersion
Checks if the givenversionis less than the givenotherVersion.- Parameters:
version- The version to compare.otherVersion- The version to compare against.- Returns:
trueifversionis less thanotherVersion, otherwisefalse.
-
compareVersions
Compares the given versions.- Parameters:
version1- The first version.version2- The second version.- Returns:
- 0 if both versions are equal, -1 if
version1is less thanversion2.
-