Class JavaVersion
java.lang.Object
org.springframework.data.gemfire.util.JavaVersion
- All Implemented Interfaces:
Comparable<JavaVersion>
Java class to represent the current version of the JRE or JVM.
- Since:
- 2.6.0
- Author:
- John Blum
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
protected static final String
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
static final JavaVersion
protected static final Integer
-
Constructor Summary
ModifierConstructorDescriptionprotected
JavaVersion
(int major, int minor) protected
JavaVersion
(int major, int minor, int patch) protected
JavaVersion
(int major, int minor, int patch, int buildNumber) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(JavaVersion version) static JavaVersion
current()
boolean
getMajor()
getMinor()
getPatch()
int
hashCode()
boolean
isJava11()
boolean
isJava17()
boolean
isJava8()
boolean
isNewerThanOrEqualTo
(JavaVersion javaVersion) boolean
isOlderThan
(JavaVersion javaVersion) boolean
protected static JavaVersion
of
(int major, int minor, int patch) toString()
-
Field Details
-
ONE_ZERO
-
ONE_ONE
-
ONE_TWO
-
ONE_THREE
-
ONE_FOUR
-
FIVE
-
SIX
-
SEVEN
-
EIGHT
-
NINE
-
TEN
-
ELEVEN
-
TWELVE
-
THIRTEEN
-
FOURTEEN
-
FIFTEEN
-
SIXTEEN
-
SEVENTEEN
-
DEFAULT_VERSION_NUMBER
protected static final int DEFAULT_VERSION_NUMBER- See Also:
-
DEFAULT_BUILD_NUMBER
protected static final int DEFAULT_BUILD_NUMBER- See Also:
-
DEFAULT_PATCH_VERSION
protected static final int DEFAULT_PATCH_VERSION- See Also:
-
ZERO
-
JAVA_VERSION_SYSTEM_PROPERTY
- See Also:
-
-
Constructor Details
-
JavaVersion
protected JavaVersion(int major, int minor) -
JavaVersion
protected JavaVersion(int major, int minor, int patch) -
JavaVersion
protected JavaVersion(int major, int minor, int patch, int buildNumber)
-
-
Method Details
-
of
-
current
-
isJava8
public boolean isJava8() -
isJava11
public boolean isJava11() -
isJava17
public boolean isJava17() -
isNewerThanOrEqualTo
-
isOlderThan
-
isUndetermined
public boolean isUndetermined() -
getMajor
-
getMinor
-
getPatch
-
getBuildNumber
-
compareTo
- Specified by:
compareTo
in interfaceComparable<JavaVersion>
-
equals
-
hashCode
public int hashCode() -
toString
-