Class VersionChecker

All Implemented Interfaces:

public class VersionChecker
extends java.lang.Object
implements java.lang.Runnable
  • Field Summary

    Modifier and Type Field Description
    static int MAX_VERSION_NUMBER  
  • Constructor Summary

    Constructor Description
    VersionChecker​(java.lang.String stringUrl)  
  • Method Summary

    Modifier and Type Method Description
    void run()  
    void setListener​(com.badlogic.gdx.scenes.scene2d.EventListener listener)  
    static java.lang.Integer stringToVersionNumber​(java.lang.String tag)
    Attempts to convert a tag string (maj.min.rev) to an integer number: num = maj*10000 + min*100 + rev

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • VersionChecker

      public VersionChecker​(java.lang.String stringUrl)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • stringToVersionNumber

      public static java.lang.Integer stringToVersionNumber​(java.lang.String tag)
      Attempts to convert a tag string (maj.min.rev) to an integer number: num = maj*10000 + min*100 + rev

      So, 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.

      tag - The tag string
      The integer
    • setListener

      public void setListener​(com.badlogic.gdx.scenes.scene2d.EventListener listener)