Package com.tagtraum.core
Class JavaVersion
- java.lang.Object
-
- com.tagtraum.core.JavaVersion
-
- All Implemented Interfaces:
Comparable<JavaVersion>
public final class JavaVersion extends Object implements Comparable<JavaVersion>
Allows determining the java VM version (System.getProperty(String)
with keyjava.vm.version
) and comparing it with other VM versions.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description JavaVersion(String v)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(JavaVersion that)
boolean
equals(Object o)
int
getBuild()
int
getMajor()
int
getMinor()
int
getPatch()
static JavaVersion
getREVersion()
int
getSecurity()
String
getVersionString()
static JavaVersion
getVMVersion()
int
hashCode()
boolean
isGreaterThan(JavaVersion javaVersion)
static boolean
isJava10()
static boolean
isJava10OrLater()
static boolean
isJava11()
static boolean
isJava11OrLater()
static boolean
isJava12()
static boolean
isJava12OrLater()
static boolean
isJava6()
static boolean
isJava6OrLater()
static boolean
isJava7()
static boolean
isJava7OrLater()
static boolean
isJava8()
static boolean
isJava8OrLater()
static boolean
isJava9()
static boolean
isJava9OrLater()
boolean
isLowerThan(JavaVersion javaVersion)
String
toString()
-
-
-
Constructor Detail
-
JavaVersion
public JavaVersion(String v)
-
-
Method Detail
-
getVMVersion
public static JavaVersion getVMVersion()
-
getREVersion
public static JavaVersion getREVersion()
-
isJava12OrLater
public static boolean isJava12OrLater()
-
isJava11OrLater
public static boolean isJava11OrLater()
-
isJava10OrLater
public static boolean isJava10OrLater()
-
isJava9OrLater
public static boolean isJava9OrLater()
-
isJava8OrLater
public static boolean isJava8OrLater()
-
isJava7OrLater
public static boolean isJava7OrLater()
-
isJava6OrLater
public static boolean isJava6OrLater()
-
isJava6
public static boolean isJava6()
-
isJava7
public static boolean isJava7()
-
isJava8
public static boolean isJava8()
-
isJava9
public static boolean isJava9()
-
isJava10
public static boolean isJava10()
-
isJava11
public static boolean isJava11()
-
isJava12
public static boolean isJava12()
-
getMajor
public int getMajor()
-
getMinor
public int getMinor()
-
getSecurity
public int getSecurity()
-
getPatch
public int getPatch()
-
getBuild
public int getBuild()
-
getVersionString
public String getVersionString()
-
compareTo
public int compareTo(JavaVersion that)
- Specified by:
compareTo
in interfaceComparable<JavaVersion>
-
isLowerThan
public boolean isLowerThan(JavaVersion javaVersion)
-
isGreaterThan
public boolean isGreaterThan(JavaVersion javaVersion)
-
-