component-installation-plugin / com.intershop.gradle.component.installation.utils / VersionComparator

VersionComparator

class VersionComparator : Comparator<String>

Comparator for version strings. As long as the version follows semantic version scheme All parts must be digits.

Constructors

<init>

VersionComparator()

Comparator for version strings. As long as the version follows semantic version scheme All parts must be digits.

Functions

compare

fun compare(version1: String?, version2: String?): Int

Compares its two versions for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.