Package de.dytanic.cloudnet.common
Enum JavaVersion
- java.lang.Object
-
- java.lang.Enum<JavaVersion>
-
- de.dytanic.cloudnet.common.JavaVersion
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JavaVersion>
public enum JavaVersion extends java.lang.Enum<JavaVersion>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<JavaVersion>fromVersion(int version)static java.util.Optional<JavaVersion>fromVersionId(double versionId)java.lang.StringgetName()static JavaVersiongetRuntimeVersion()intgetVersion()doublegetVersionId()booleanisSupported(JavaVersion minJavaVersion, JavaVersion maxJavaVersion)booleanisSupportedByMax(JavaVersion maxRequiredJavaVersion)booleanisSupportedByMin(JavaVersion minRequiredJavaVersion)booleanisUnknown()static JavaVersionvalueOf(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.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final JavaVersion UNKNOWN
-
JAVA_8
public static final JavaVersion JAVA_8
-
JAVA_9
public static final JavaVersion JAVA_9
-
JAVA_10
public static final JavaVersion JAVA_10
-
JAVA_11
public static final JavaVersion JAVA_11
-
JAVA_12
public static final JavaVersion JAVA_12
-
JAVA_13
public static final JavaVersion JAVA_13
-
JAVA_14
public static final JavaVersion JAVA_14
-
JAVA_15
public static final JavaVersion JAVA_15
-
JAVA_16
public static final JavaVersion JAVA_16
-
JAVA_17
public static final JavaVersion JAVA_17
-
-
Method Detail
-
values
public static JavaVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaVersion c : JavaVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaVersion valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getRuntimeVersion
public static JavaVersion getRuntimeVersion()
-
fromVersionId
public static java.util.Optional<JavaVersion> fromVersionId(double versionId)
-
fromVersion
public static java.util.Optional<JavaVersion> fromVersion(int version)
-
getVersion
public int getVersion()
-
getVersionId
public double getVersionId()
-
getName
public java.lang.String getName()
-
isUnknown
public boolean isUnknown()
-
isSupported
public boolean isSupported(JavaVersion minJavaVersion, JavaVersion maxJavaVersion)
-
isSupportedByMin
public boolean isSupportedByMin(JavaVersion minRequiredJavaVersion)
-
isSupportedByMax
public boolean isSupportedByMax(JavaVersion maxRequiredJavaVersion)
-
-