Package gaiasky.util.update
Class VersionChecker
java.lang.Object
gaiasky.util.update.VersionChecker
- All Implemented Interfaces:
Runnable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
void
setListener(com.badlogic.gdx.scenes.scene2d.EventListener listener)
static Integer
stringToVersionNumber(String tag)
Attempts to convert a tag string (maj.min.rev) to an integer number: num = maj*10000 + min*100 + rev
-
Field Details
-
MAX_VERSION_NUMBER
public static final int MAX_VERSION_NUMBER- See Also:
- Constant Field Values
-
-
Constructor Details
-
VersionChecker
-
-
Method Details
-
run
public void run() -
stringToVersionNumber
Attempts to convert a tag string (maj.min.rev) to an integer number: num = maj*10000 + min*100 + revSo, for instance: 1.6.2 -> 010602 2.2.0 -> 020200
Things like 2.4.0-RC4 are also detected, but the -RC4 suffix is ignored. If no conversion is possible (no maj.min.rev is detected in the string), the version is assumed to be a development branch and the maximum version number (1000000) is given.
- Parameters:
tag
- The tag string- Returns:
- The integer
-
setListener
public void setListener(com.badlogic.gdx.scenes.scene2d.EventListener listener)
-