Package games.stendhal.common
Class Version
java.lang.Object
games.stendhal.common.Version
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkCompatibility(String v1, String v2)
Checks whether these versions of stendhal are compatible.static int
Compares two versions.static String
Extract the specified number of parts from a version-string.static String
gets the version
-
Field Details
-
VERSION
Stendhal version- See Also:
- Constant Field Values
-
-
Method Details
-
cut
Extract the specified number of parts from a version-string.- Parameters:
version
- version-stringparts
- number of parts to extract- Returns:
- parts of the version-string
-
compare
Compares two versions.- Parameters:
v1
- 1st version stringv2
- 2nd version string- Returns:
- see compare
-
checkCompatibility
Checks whether these versions of stendhal are compatible.- Parameters:
v1
- one version stringv2
- another version string- Returns:
- true, iff the first two components are equal
-
getVersion
gets the version- Returns:
- version
-