public enum JavaVersion extends Enum<JavaVersion>
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.
|
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 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.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
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.