Class VersionComparator

java.lang.Object
one.tranic.t.base.parse.version.VersionComparator

public class VersionComparator extends Object
The VersionComparator class provides utility methods for comparing software version strings.
  • Constructor Details

    • VersionComparator

      public VersionComparator()
  • Method Details

    • compareVersions

      public static int compareVersions(String localVersion, String remoteVersion)
      Compares two version strings and returns an integer indicating their relative order.
      Parameters:
      localVersion - the local version string to be compared
      remoteVersion - the remote version string to be compared
      Returns:
      a negative integer if localVersion is less than remoteVersion, zero if both versions are equal, or a positive integer if localVersion is greater than remoteVersion