Package com.jk.core.http
Enum Class JKHttpStatus.Series
- All Implemented Interfaces:
Serializable
,Comparable<JKHttpStatus.Series>
,Constable
- Enclosing class:
- JKHttpStatus
Enumeration of HTTP status series.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe client error.The informational.The redirection.The server error.The successful. -
Method Summary
Modifier and TypeMethodDescriptionstatic JKHttpStatus.Series
resolve
(int statusCode) This method resolve the given status code to anHttpStatus.Series
, if possible.int
value()
This method gets the integer value of this status series.static JKHttpStatus.Series
valueOf
(int statusCode) This method gets the enum constant of this type with the corresponding series.static JKHttpStatus.Series
valueOf
(JKHttpStatus status) This method gets the enum constant of this type with the corresponding series.static JKHttpStatus.Series
Returns the enum constant of this class with the specified name.static JKHttpStatus.Series[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INFORMATIONAL
The informational. -
SUCCESSFUL
The successful. -
REDIRECTION
The redirection. -
CLIENT_ERROR
The client error. -
SERVER_ERROR
The server error.
-
-
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
-
value
public int value()This method gets the integer value of this status series. Ranges from 1 to 5.- Returns:
- the integer value of this status series. Ranges from 1 to 5.
-
valueOf
This method gets the enum constant of this type with the corresponding series.- Parameters:
status
- Specifies a standard HTTP status enum value.- Returns:
- the enum constant of this type with the corresponding series.
- Throws:
IllegalArgumentException
- if this enum has no corresponding constant.
-
valueOf
This method gets the enum constant of this type with the corresponding series.- Parameters:
statusCode
- Specifies the HTTP status code (potentially non-standard).- Returns:
- the enum constant of this type with the corresponding series.
- Throws:
IllegalArgumentException
- if this enum has no corresponding constant.
-
resolve
This method resolve the given status code to anHttpStatus.Series
, if possible.- Parameters:
statusCode
- Specifies the HTTP status code (potentially non-standard).- Returns:
- the corresponding
Series
, ornull
if not found. - Since:
- 5.1.3
-