public enum HttpStatusFamily extends Enum<HttpStatusFamily>
of(int)
.Enum Constant and Description |
---|
CLIENT_ERROR
4xx response family.
|
INFORMATIONAL
1xx response family.
|
OTHER
The family for any status code outside of the range 100-599.
|
REDIRECTION
3xx response family.
|
SERVER_ERROR
5xx response family.
|
SUCCESSFUL
2xx response family.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isOneOf(HttpStatusFamily... families)
Determine whether this HTTP status family is in the list of provided families.
|
static HttpStatusFamily |
of(int httpStatusCode)
Retrieve the HTTP status family for the given HTTP status code.
|
static HttpStatusFamily |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpStatusFamily[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpStatusFamily INFORMATIONAL
public static final HttpStatusFamily SUCCESSFUL
public static final HttpStatusFamily REDIRECTION
public static final HttpStatusFamily CLIENT_ERROR
public static final HttpStatusFamily SERVER_ERROR
public static final HttpStatusFamily OTHER
public static HttpStatusFamily[] values()
for (HttpStatusFamily c : HttpStatusFamily.values()) System.out.println(c);
public static HttpStatusFamily valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static HttpStatusFamily of(int httpStatusCode)
public boolean isOneOf(HttpStatusFamily... families)
families
- The list of families to check against this family.Copyright © 2019. All rights reserved.