Package VASSAL.tools.version
Class VersionUtils
java.lang.Object
VASSAL.tools.version.VersionUtils
public class VersionUtils extends Object
-
Constructor Summary
Constructors Modifier Constructor Description protected
VersionUtils()
-
Method Summary
Modifier and Type Method Description static int
compareVersions(String v0, String v1)
Compares VASSAL version strings.static boolean
isCurrent(String version)
static Boolean
isUpdateable(String runningVersion)
static void
main(String[] args)
static String
nextMinorVersion(String v)
static String
truncateToMinorVersion(String v)
-
Constructor Details
-
VersionUtils
protected VersionUtils()
-
-
Method Details
-
isCurrent
- Throws:
IOException
-
compareVersions
Compares VASSAL version strings. This method is guaranteed to correctly compare the current version string with any other version string. It is not guaranteed to correctly compare two arbitrary version strings.- Returns:
- negative if
v0 < v1
, positive ifv0 > v1
, and zero ifv0 == v1
or if the ordering cannot be determined from the parseable parts of the twoString
s.
-
isUpdateable
- Throws:
IOException
-
nextMinorVersion
-
truncateToMinorVersion
-
main
- Throws:
IOException
-