public enum JavaSEPlatform extends java.lang.Enum<JavaSEPlatform> implements java.lang.Comparable<JavaSEPlatform>
| Enum Constant and Description |
|---|
v1_1
Java SE 1.1.
|
v1_2
Java SE 1.2.
|
v1_3
Java SE 1.3.
|
v1_4
Java SE 1.4.
|
v1_5
Java SE 1.5.
|
v1_6
Java SE 1.6.
|
v1_7
Java SE 1.7.
|
v1_8
Java SE 1.8.
|
v1_9
Java SE 9.
|
v9_0
Java SE 9.
|
| Modifier and Type | Field and Description |
|---|---|
static JavaSEPlatform |
CURRENT
Current Java SE platform.
|
static int |
LENGTH
GlassFish Java SE platform enumeration length.
|
static JavaSEPlatform |
MIN_SUPPORTED
Lowest supported Java SE platform.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
atLeast(JavaSEPlatform platform)
Check if this platform is equal or greater to specified platform.
|
int |
getMajor()
Get major version number.
|
int |
getMinor()
Get minor version number.
|
static boolean |
is(JavaSEPlatform platform)
Check whether current Java SE is exactly matching provided platform.
|
boolean |
isSupported()
Check whether this platform is supported platform.
|
java.lang.String |
toString()
Convert Java SE platform version value to human readable
String. |
static JavaSEPlatform |
toValue(int major,
int minor)
Returns a
JavaSEPlatform matching provided
major and minor version numbers. |
static JavaSEPlatform |
toValue(java.lang.String platformName)
Returns a
JavaSEPlatform with a value represented by the
specified String. |
static JavaSEPlatform |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JavaSEPlatform[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
java.lang.String |
versionString()
Generate
String containing minor and major version numbers
in <major> '.' <minor> format. |
static java.lang.String |
versionString(int major,
int minor)
Generate
String containing minor and major version numbers
in <major> '.' <minor> format. |
public static final JavaSEPlatform v1_1
public static final JavaSEPlatform v1_2
public static final JavaSEPlatform v1_3
public static final JavaSEPlatform v1_4
public static final JavaSEPlatform v1_5
public static final JavaSEPlatform v1_6
public static final JavaSEPlatform v1_7
public static final JavaSEPlatform v1_8
public static final JavaSEPlatform v1_9
public static final JavaSEPlatform v9_0
public static final int LENGTH
public static final JavaSEPlatform CURRENT
public static final JavaSEPlatform MIN_SUPPORTED
public static JavaSEPlatform[] values()
for (JavaSEPlatform c : JavaSEPlatform.values()) System.out.println(c);
public static JavaSEPlatform 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 static boolean is(JavaSEPlatform platform)
platform - Java SE platform to compare with.public static JavaSEPlatform toValue(java.lang.String platformName)
JavaSEPlatform with a value represented by the
specified String. The JavaSEPlatform returned
represents existing value only if specified String
matches any String returned by versionString()
method.
Otherwise null value is returned.platformName - Value containing JavaSEPlatform
versionString representation.JavaSEPlatform value represented
by String or null if value
was not recognized.public static JavaSEPlatform toValue(int major, int minor)
JavaSEPlatform matching provided
major and minor version numbers.major - Major version number.minor - Minor version number.JavaSEPlatform value matching provided
major and minor version numbers
or null when such a value does not exist.public static final java.lang.String versionString(int major,
int minor)
String containing minor and major version numbers
in <major> '.' <minor> format.major - Major version number.minor - Minor version number.Stringpublic final int getMajor()
public final int getMinor()
public boolean atLeast(JavaSEPlatform platform)
platform - Platform to compare with.true if this platform is equal
or greater to specified platform or false otherwise.public boolean isSupported()
true when this platform is supported
platform or false otherwise.public java.lang.String versionString()
String containing minor and major version numbers
in <major> '.' <minor> format.Stringpublic java.lang.String toString()
String.toString in class java.lang.Enum<JavaSEPlatform>String representation of the value of this object.EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference