compareTo
Compares this version with another version for ordering.
Versions are compared in order of major, minor, then patch version numbers. Higher version numbers are considered greater.
Return
Negative integer if this version is less than other, zero if equal, positive integer if greater
Example:
Version("2.1.0").compareTo(Version("2.0.1")) // returns positive (2.1.0 2.0.1)
Version("1.0.0").compareTo(Version("2.0.0")) // returns negative (1.0.0 < 2.0.0)Content copied to clipboard
Parameters
other
The version to compare with