Class VersionComparatorUtil


  • public class VersionComparatorUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int compare​(java.lang.String ver1, java.lang.String ver2)
      Compare two version strings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VersionComparatorUtil

        public VersionComparatorUtil()
    • Method Detail

      • compare

        public static int compare​(java.lang.String ver1,
                                  java.lang.String ver2)
        Compare two version strings. See TeamCity documentation on requirements comparison for formal description. Examples: 1.0rc1 < 1.0release, 1.0 < 1.0.1, 1.1 > 1.02
        Returns:
        0 if ver1 equals ver2, positive value if ver1 > ver2, negative value if ver1 < ver2