Class JdkVersion
java.lang.Object
org.glassfish.jersey.internal.util.JdkVersion
- All Implemented Interfaces:
Comparable<JdkVersion>
JDK Version related utilities. Ported from Grizzly project.
- Since:
- 2.3
- Author:
- Ryan Lubke (ryan.lubke at oracle.com), Alexey Stashok
-
Method Summary
Modifier and TypeMethodDescriptionint
int
compareTo
(JdkVersion otherVersion) static JdkVersion
int
int
getMajor()
int
getMinor()
int
boolean
Returns true ifsun.misc.Unsafe
is present in the current JDK version, or false otherwise.static JdkVersion
parseVersion
(String versionString) toString()
-
Method Details
-
parseVersion
-
getJdkVersion
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getMaintenance
public int getMaintenance() -
getUpdate
public int getUpdate() -
isUnsafeSupported
public boolean isUnsafeSupported()Returns true ifsun.misc.Unsafe
is present in the current JDK version, or false otherwise.- Since:
- 2.3.6
-
toString
-
compareTo
-
compareTo
- Specified by:
compareTo
in interfaceComparable<JdkVersion>
-