public abstract class JavaVersion extends Object implements Comparable<JavaVersion>
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_BUILD_NUMBER |
protected static int |
DEFAULT_PATCH_VERSION |
protected static int |
DEFAULT_VERSION_NUMBER |
static JavaVersion |
EIGHT |
static JavaVersion |
ELEVEN |
static JavaVersion |
FIFTEEN |
static JavaVersion |
FIVE |
static JavaVersion |
FOURTEEN |
protected static String |
JAVA_VERSION_SYSTEM_PROPERTY |
static JavaVersion |
NINE |
static JavaVersion |
ONE_FOUR |
static JavaVersion |
ONE_ONE |
static JavaVersion |
ONE_THREE |
static JavaVersion |
ONE_TWO |
static JavaVersion |
ONE_ZERO |
static JavaVersion |
SEVEN |
static JavaVersion |
SEVENTEEN |
static JavaVersion |
SIX |
static JavaVersion |
SIXTEEN |
static JavaVersion |
TEN |
static JavaVersion |
THIRTEEN |
static JavaVersion |
TWELVE |
protected static Integer |
ZERO |
Modifier | Constructor and Description |
---|---|
protected |
JavaVersion(int major,
int minor) |
protected |
JavaVersion(int major,
int minor,
int patch) |
protected |
JavaVersion(int major,
int minor,
int patch,
int buildNumber) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JavaVersion version) |
static JavaVersion |
current() |
boolean |
equals(Object obj) |
Integer |
getBuildNumber() |
Integer |
getMajor() |
Integer |
getMinor() |
Integer |
getPatch() |
int |
hashCode() |
boolean |
isJava11() |
boolean |
isJava17() |
boolean |
isJava8() |
boolean |
isNewerThanOrEqualTo(JavaVersion javaVersion) |
boolean |
isOlderThan(JavaVersion javaVersion) |
boolean |
isUndetermined() |
protected static JavaVersion |
of(int major,
int minor,
int patch) |
String |
toString() |
public static final JavaVersion ONE_ZERO
public static final JavaVersion ONE_ONE
public static final JavaVersion ONE_TWO
public static final JavaVersion ONE_THREE
public static final JavaVersion ONE_FOUR
public static final JavaVersion FIVE
public static final JavaVersion SIX
public static final JavaVersion SEVEN
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 final JavaVersion FIFTEEN
public static final JavaVersion SIXTEEN
public static final JavaVersion SEVENTEEN
protected static final int DEFAULT_VERSION_NUMBER
protected static final int DEFAULT_BUILD_NUMBER
protected static final int DEFAULT_PATCH_VERSION
protected static final Integer ZERO
protected static final String JAVA_VERSION_SYSTEM_PROPERTY
protected JavaVersion(int major, int minor)
protected JavaVersion(int major, int minor, int patch)
protected JavaVersion(int major, int minor, int patch, int buildNumber)
public static JavaVersion current()
protected static JavaVersion of(int major, int minor, int patch)
public boolean isJava8()
public boolean isJava11()
public boolean isJava17()
public boolean isNewerThanOrEqualTo(@Nullable JavaVersion javaVersion)
public boolean isOlderThan(@Nullable JavaVersion javaVersion)
public boolean isUndetermined()
public int compareTo(@NonNull JavaVersion version)
compareTo
in interface Comparable<JavaVersion>
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.