Package one.tranic.t.base.parse.version
Class VersionComparator
java.lang.Object
one.tranic.t.base.parse.version.VersionComparator
The VersionComparator class provides utility methods for comparing software version strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareVersions(String localVersion, String remoteVersion) Compares two version strings and returns an integer indicating their relative order.
-
Constructor Details
-
VersionComparator
public VersionComparator()
-
-
Method Details
-
compareVersions
Compares two version strings and returns an integer indicating their relative order.- Parameters:
localVersion- the local version string to be comparedremoteVersion- 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
-