java.lang.Object
org.sentrysoftware.metricshub.engine.common.helpers.VersionHelper

public class VersionHelper extends Object
Utility class for handling MetricsHub engine version information.
  • Method Details

    • getClassVersion

      public static String getClassVersion()
      Returns the project version.
      Returns:
      The current version of the MetricsHub engine module (which is equal to the project version).
    • isVersionLessThanOtherVersion

      public static boolean isVersionLessThanOtherVersion(String version, String otherVersion)
      Checks if the given version is less than the given otherVersion.
      Parameters:
      version - The version to compare.
      otherVersion - The version to compare against.
      Returns:
      true if version is less than otherVersion, otherwise false.
    • compareVersions

      public static int compareVersions(String version1, String version2)
      Compares the given versions.
      Parameters:
      version1 - The first version.
      version2 - The second version.
      Returns:
      0 if both versions are equal, -1 if version1 is less than version2.