org.apache.mina.coap

## Enum CoapOptionType

- java.lang.Object
- - java.lang.Enum<CoapOptionType>
  - - org.apache.mina.coap.CoapOptionType

All Implemented Interfaces:
  Serializable, Comparable<CoapOptionType>

    public enum CoapOptionType
    extends Enum<CoapOptionType>

A type of CoAP option following the CoAP RFC list.

Author:
  Apache MINA Project

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ACCEPT`
`CONTENT_FORMAT`
`ETAG`
`IF_MATCH`
`IF_NONE_MATCH`
`LOCATION_PATH`
`LOCATION_QUERY`
`MAX_AGE`
`OBSERVE`
`PROXY_SCHEME`
`PROXY_URI`
`URI_HOST`
`URI_PATH`
`URI_PORT`
`URI_QUERY`

### Method Summary

Methods
`static CoapOptionType` `fromCode(int code)` Find the `CoapOptionType` for the given value code (`null` if not found)
`int` `getCode()`
`static CoapOptionType` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static CoapOptionType[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### IF_MATCH

    public static final CoapOptionType IF_MATCH

#### URI_HOST

    public static final CoapOptionType URI_HOST

#### ETAG

    public static final CoapOptionType ETAG

#### IF_NONE_MATCH

    public static final CoapOptionType IF_NONE_MATCH

#### OBSERVE

    public static final CoapOptionType OBSERVE

#### URI_PORT

    public static final CoapOptionType URI_PORT

#### LOCATION_PATH

    public static final CoapOptionType LOCATION_PATH

#### URI_PATH

    public static final CoapOptionType URI_PATH

#### CONTENT_FORMAT

    public static final CoapOptionType CONTENT_FORMAT

#### MAX_AGE

    public static final CoapOptionType MAX_AGE

#### URI_QUERY

    public static final CoapOptionType URI_QUERY

#### ACCEPT

    public static final CoapOptionType ACCEPT

#### LOCATION_QUERY

    public static final CoapOptionType LOCATION_QUERY

#### PROXY_URI

    public static final CoapOptionType PROXY_URI

#### PROXY_SCHEME

    public static final CoapOptionType PROXY_SCHEME

### Method Detail

#### values

    public static CoapOptionType[] 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 (CoapOptionType c : CoapOptionType.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static CoapOptionType valueOf(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:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

#### getCode

    public int getCode()

Returns:
  the numeric code for this option type

#### fromCode

    public static CoapOptionType fromCode(int code)

Find the `CoapOptionType` for the given value code (`null` if not found)