Package net.officefloor.server.http
Enum HttpMethod.HttpMethodEnum
- java.lang.Object
-
- java.lang.Enum<HttpMethod.HttpMethodEnum>
-
- net.officefloor.server.http.HttpMethod.HttpMethodEnum
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HttpMethod.HttpMethodEnum>
- Enclosing class:
- HttpMethod
public static enum HttpMethod.HttpMethodEnum extends java.lang.Enum<HttpMethod.HttpMethodEnum>
HttpMethod
Enum
for common HTTP methods.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONNECT
CommonHttpMethod
instances.DELETE
GET
HEAD
OPTIONS
OTHER
Non commonHttpMethod
.POST
PUT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpMethod
getHttpMethod()
Obtains the singletonHttpMethod
for thisHttpMethod.HttpMethodEnum
.static HttpMethod.HttpMethodEnum
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HttpMethod.HttpMethodEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONNECT
public static final HttpMethod.HttpMethodEnum CONNECT
CommonHttpMethod
instances.
-
DELETE
public static final HttpMethod.HttpMethodEnum DELETE
-
GET
public static final HttpMethod.HttpMethodEnum GET
-
HEAD
public static final HttpMethod.HttpMethodEnum HEAD
-
OPTIONS
public static final HttpMethod.HttpMethodEnum OPTIONS
-
PUT
public static final HttpMethod.HttpMethodEnum PUT
-
POST
public static final HttpMethod.HttpMethodEnum POST
-
OTHER
public static final HttpMethod.HttpMethodEnum OTHER
Non commonHttpMethod
.
-
-
Method Detail
-
values
public static HttpMethod.HttpMethodEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HttpMethod.HttpMethodEnum c : HttpMethod.HttpMethodEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpMethod.HttpMethodEnum valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getHttpMethod
public HttpMethod getHttpMethod()
Obtains the singleton
HttpMethod
for thisHttpMethod.HttpMethodEnum
.Note for
OTHER
this returnsnull
.- Returns:
HttpMethod
.
-
-