Package org.springframework.boot.system
Enum Class JavaVersion
- All Implemented Interfaces:
- Serializable,- Comparable<JavaVersion>,- Constable
Known Java versions.
- Since:
- 2.0.0
- Author:
- Oliver Gierke, Phillip Webb, Moritz Halbritter
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionstatic JavaVersionReturns theJavaVersionof the current runtime.booleanisEqualOrNewerThan(JavaVersion version) Return if this version is equal to or newer than a given version.booleanisOlderThan(JavaVersion version) Return if this version is older than a given version.toString()static JavaVersionReturns the enum constant of this class with the specified name.static JavaVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
SEVENTEENJava 17.- Since:
- 2.5.3
 
- 
EIGHTEENJava 18.- Since:
- 2.5.11
 
- 
NINETEENJava 19.- Since:
- 2.6.12
 
- 
TWENTYJava 20.- Since:
- 2.7.13
 
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
toString- Overrides:
- toStringin class- Enum<JavaVersion>
 
- 
getJavaVersionReturns theJavaVersionof the current runtime.- Returns:
- the JavaVersion
 
- 
isEqualOrNewerThanReturn if this version is equal to or newer than a given version.- Parameters:
- version- the version to compare
- Returns:
- trueif this version is equal to or newer than- version
 
- 
isOlderThanReturn if this version is older than a given version.- Parameters:
- version- the version to compare
- Returns:
- trueif this version is older than- version
 
 
-