public enum JavaVersion extends Enum<JavaVersion>
| Enum Constant and Description | 
|---|
| EIGHTJava 1.8. | 
| ELEVENJava 11. | 
| FOURTEENJava 14. | 
| NINEJava 9. | 
| TENJava 10. | 
| THIRTEENJava 13. | 
| TWELVEJava 12. | 
| Modifier and Type | Method and Description | 
|---|---|
| static JavaVersion | getJavaVersion()Returns the  JavaVersionof 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 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.JavaVersionpublic boolean isEqualOrNewerThan(JavaVersion version)
version - the version to comparetrue if this version is equal to or newer than versionpublic boolean isOlderThan(JavaVersion version)
version - the version to comparetrue if this version is older than versionCopyright © 2021 Pivotal Software, Inc.. All rights reserved.