枚举 HttpStatus.Series
- java.lang.Object
- java.lang.Enum<HttpStatus.Series>
- org.springframework.http.HttpStatus.Series
- 所有已实现的接口:
Serializable
,Comparable<HttpStatus.Series>
- 封闭类:
- HttpStatus
public static enum HttpStatus.Series extends Enum<HttpStatus.Series>
Enumeration of HTTP status series.Retrievable via
HttpStatus.series()
.
枚举常量概要
枚举常量 枚举常量 说明 CLIENT_ERROR
INFORMATIONAL
REDIRECTION
SERVER_ERROR
SUCCESSFUL
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 int
value()
Return the integer value of this status series.static HttpStatus.Series
valueOf(int statusCode)
Return the enum constant of this type with the corresponding series.static HttpStatus.Series
valueOf(String name)
返回带有指定名称的该类型的枚举常量。static HttpStatus.Series
valueOf(HttpStatus status)
Return the enum constant of this type with the corresponding series.static HttpStatus.Series[]
values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
枚举常量详细资料
INFORMATIONAL
public static final HttpStatus.Series INFORMATIONAL
SUCCESSFUL
public static final HttpStatus.Series SUCCESSFUL
REDIRECTION
public static final HttpStatus.Series REDIRECTION
CLIENT_ERROR
public static final HttpStatus.Series CLIENT_ERROR
SERVER_ERROR
public static final HttpStatus.Series SERVER_ERROR
方法详细资料
values
public static HttpStatus.Series[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (HttpStatus.Series c : HttpStatus.Series.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
valueOf
public static HttpStatus.Series valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值
value
public int value()
Return the integer value of this status series. Ranges from 1 to 5.
valueOf
public static HttpStatus.Series valueOf(HttpStatus status)
Return the enum constant of this type with the corresponding series.- 参数:
status
- a standard HTTP status enum value- 返回:
- the enum constant of this type with the corresponding series
- 抛出:
IllegalArgumentException
- if this enum has no corresponding constant
valueOf
public static HttpStatus.Series valueOf(int statusCode)
Return the enum constant of this type with the corresponding series.- 参数:
statusCode
- the HTTP status code (potentially non-standard)- 返回:
- the enum constant of this type with the corresponding series
- 抛出:
IllegalArgumentException
- if this enum has no corresponding constant