public enum JavaVersion extends java.lang.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.
|
TWENTY
Java 20.
|
TWENTY_ONE
Java 21.
|
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.
|
java.lang.String |
toString() |
static JavaVersion |
valueOf(java.lang.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 final JavaVersion TWENTY
public static final JavaVersion TWENTY_ONE
public static JavaVersion[] values()
for (JavaVersion c : JavaVersion.values()) System.out.println(c);
public static JavaVersion valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.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