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.
This comparison takes into account both numeric and alphanumeric segments of the versions, including handling different formats such as pre-release identifiers or build metadata.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VersionComparator
public VersionComparator()
-
-
Method Details
-
cmpVer
Compares two version strings and returns an integer indicating their relative order.This method accounts for numeric and alphanumeric segments in the version strings.
- Parameters:
vLocal- the local version string to be comparedvRemote- the remote version string to be compared- Returns:
- a negative integer if vLocal is less than vRemote, zero if both versions are equal, or a positive integer if vLocal is greater than vRemote
-