Object SemanticVersionComparator.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String findNewestVersion(List<String> versions) Check a list of versions following the semantic-scheme and find the latest one.
      final String findOldestVersion(List<String> versions) Check a list of versions following the semantic-scheme and find the oldest one.
      final Boolean compareSemantics(String currentVersion, String newVersion, Comparison comparison) Compare the given new version against the given current version, depending on comparison type EQUAL, NEW, or EQUAL_OR_NEW.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • compareSemantics

         final Boolean compareSemantics(String currentVersion, String newVersion, Comparison comparison)

        Compare the given new version against the given current version, depending on comparison type EQUAL, NEW, or EQUAL_OR_NEW. Checks are performed with the semantic release-formatting, e.g. 1.2.3, 2.3.4, 6.6.6

        Parameters:
        currentVersion - Current version to check against newVersion.
        newVersion - New version to check against currentVersion.
        comparison - Comparison level.
        Returns:

        Boolean. Returns true if the new version is indeed newer than the current version. Otherwise false.