public enum JavaVersion extends java.lang.Enum<JavaVersion>
Enum Constant and Description |
---|
JAVA_0_9
The Java version reported by Android.
|
JAVA_1_1
Java 1.1.
|
JAVA_1_2
Java 1.2.
|
JAVA_1_3
Java 1.3.
|
JAVA_1_4
Java 1.4.
|
JAVA_1_5
Java 1.5.
|
JAVA_1_6
Java 1.6.
|
JAVA_1_7
Java 1.7.
|
JAVA_1_8
Java 1.8.
|
JAVA_1_9
Deprecated.
As of release 3.5, replaced by
JAVA_9 |
JAVA_10
Java 10.
|
JAVA_11
Java 11.
|
JAVA_12
Java 12.
|
JAVA_13
Java 13.
|
JAVA_14
Java 14.
|
JAVA_15
Java 15.
|
JAVA_16
Java 16.
|
JAVA_17
Java 17.
|
JAVA_18
Java 18.
|
JAVA_19
Java 19.
|
JAVA_20
Java 20.
|
JAVA_21
Java 21.
|
JAVA_9
Java 9.
|
JAVA_RECENT
The most recent java version.
|
Modifier and Type | Method and Description |
---|---|
boolean |
atLeast(JavaVersion requiredVersion)
Whether this version of Java is at least the version of Java passed in.
|
boolean |
atMost(JavaVersion requiredVersion)
Whether this version of Java is at most the version of Java passed in.
|
java.lang.String |
toString()
The string value is overridden to return the standard name.
|
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 JAVA_0_9
public static final JavaVersion JAVA_1_1
public static final JavaVersion JAVA_1_2
public static final JavaVersion JAVA_1_3
public static final JavaVersion JAVA_1_4
public static final JavaVersion JAVA_1_5
public static final JavaVersion JAVA_1_6
public static final JavaVersion JAVA_1_7
public static final JavaVersion JAVA_1_8
@Deprecated public static final JavaVersion JAVA_1_9
JAVA_9
public static final JavaVersion JAVA_9
public static final JavaVersion JAVA_10
public static final JavaVersion JAVA_11
public static final JavaVersion JAVA_12
public static final JavaVersion JAVA_13
public static final JavaVersion JAVA_14
public static final JavaVersion JAVA_15
public static final JavaVersion JAVA_16
public static final JavaVersion JAVA_17
public static final JavaVersion JAVA_18
public static final JavaVersion JAVA_19
public static final JavaVersion JAVA_20
public static final JavaVersion JAVA_21
public static final JavaVersion JAVA_RECENT
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 boolean atLeast(JavaVersion requiredVersion)
For example:
myVersion.atLeast(JavaVersion.JAVA_1_4)
requiredVersion
- the version to check against, not nullpublic boolean atMost(JavaVersion requiredVersion)
For example:
myVersion.atMost(JavaVersion.JAVA_1_4)
requiredVersion
- the version to check against, not nullpublic java.lang.String toString()
For example, "1.5"
.
toString
in class java.lang.Enum<JavaVersion>
Copyright © 2010 - 2023 Adobe. All Rights Reserved