Package com.helger.http
Enum Class EHttpVersion
- All Implemented Interfaces:
com.helger.base.name.IHasName,Serializable,Comparable<EHttpVersion>,Constable
HTTP versions as defined in RFC 9112 (HTTP/1.1), RFC 9113 (HTTP/2) and RFC 9114 (HTTP/3).
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable EHttpVersiongetFromNameOrNull(@Nullable String sName) Get the enum value matching the provided name.@NonNull @Nonempty StringgetName()booleanis10()booleanstatic EHttpVersionReturns the enum constant of this class with the specified name.static EHttpVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTTP_10
-
HTTP_11
-
HTTP_20
-
HTTP_30
HTTP/3 as defined in RFC 9114. @since 12.1.5
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException- if the argument is null
-
getName
- Specified by:
getNamein interfacecom.helger.base.name.IHasName
-
is10
public boolean is10()- Returns:
trueif this is HTTP/1.0,falseotherwise.
-
isAtLeast11
public boolean isAtLeast11()- Returns:
trueif this is HTTP/1.1 or later,falseotherwise.
-
getFromNameOrNull
Get the enum value matching the provided name.- Parameters:
sName- The name to search. May benull.- Returns:
nullif no matching enum value was found.
-