public final class VersionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
checkVersion(String version,
String versionPattern)
Compares the version string against a version pattern.
|
static int |
compareVersions(int[] versionInts1,
int[] versionInts2)
Compares the two given version integer arrays.
|
static int |
compareVersions(int[] versionInts1,
String version2)
Compares the two given version strings.
|
static int |
compareVersions(String version1,
String version2)
Compares the two given version strings.
|
static String |
getVersion()
Returns the application version.
|
static void |
logVersion()
Logs the application version.
|
public static void logVersion()
public static String getVersion()
public static boolean checkVersion(String version, String versionPattern)
version
- the versionversionPattern
- the version patternpublic static int compareVersions(String version1, String version2)
version1
- the first version stringversion2
- the second version stringpublic static int compareVersions(int[] versionInts1, String version2)
versionInts1
- the first version int arrayversion2
- the second version stringpublic static int compareVersions(int[] versionInts1, int[] versionInts2)
versionInts1
- the first version int arrayversionInts2
- the second version int array