public enum JavaVersion extends Enum<JavaVersion>
Enum Constant and Description |
---|
EIGHT
Java 1.8.
|
EIGHTEEN
Java 18.
|
ELEVEN
Java 11.
|
FIFTEEN
Java 15.
|
FOURTEEN
Java 14.
|
NINE
Java 9.
|
NINETEEN
Java 19.
|
SEVENTEEN
Java 17.
|
SIXTEEN
Java 16.
|
TEN
Java 10.
|
THIRTEEN
Java 13.
|
TWELVE
Java 12.
|
Modifier and Type | Method and Description |
---|---|
static JavaVersion |
getJavaVersion()
Returns the
JavaVersion of the current runtime. |
boolean |
isEqualOrNewerThan(JavaVersion version)
Return if this version is equal to or newer than a given version.
|
boolean |
isOlderThan(JavaVersion version)
Return if this version is older than a given version.
|
String |
toString() |
static JavaVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JavaVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaVersion EIGHT
public static final JavaVersion NINE
public static final JavaVersion TEN
public static final JavaVersion ELEVEN
public static final JavaVersion TWELVE
public static final JavaVersion THIRTEEN
public static final JavaVersion FOURTEEN
public static final JavaVersion FIFTEEN
public static final JavaVersion SIXTEEN
public static final JavaVersion SEVENTEEN
public static final JavaVersion EIGHTEEN
public static final JavaVersion NINETEEN
public static JavaVersion[] values()
for (JavaVersion c : JavaVersion.values()) System.out.println(c);
public static JavaVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<JavaVersion>
public static JavaVersion getJavaVersion()
JavaVersion
of the current runtime.JavaVersion
public boolean isEqualOrNewerThan(JavaVersion version)
version
- the version to comparetrue
if this version is equal to or newer than version
public boolean isOlderThan(JavaVersion version)
version
- the version to comparetrue
if this version is older than version