Class Version

java.lang.Object
games.stendhal.common.Version

public class Version extends Object
Handles version numbers Actual number stored in games.stendhal.common.Debug.VERSION This file duplicates methods from games.stendhal.client.update.Version as the updater should not depend on anything outside games.stendhal.client.update
Author:
hendrik
  • Field Details

  • Method Details

    • cut

      public static String cut(String version, int parts)
      Extract the specified number of parts from a version-string.
      Parameters:
      version - version-string
      parts - number of parts to extract
      Returns:
      parts of the version-string
    • compare

      public static int compare(String v1, String v2)
      Compares two versions.
      Parameters:
      v1 - 1st version string
      v2 - 2nd version string
      Returns:
      see compare
    • checkCompatibility

      public static boolean checkCompatibility(String v1, String v2)
      Checks whether these versions of stendhal are compatible.
      Parameters:
      v1 - one version string
      v2 - another version string
      Returns:
      true, iff the first two components are equal
    • getVersion

      public static String getVersion()
      gets the version
      Returns:
      version