Package org.drasyl.util.protocol
Enum NatPmpUtil.ResultCode
- java.lang.Object
-
- java.lang.Enum<NatPmpUtil.ResultCode>
-
- org.drasyl.util.protocol.NatPmpUtil.ResultCode
-
- All Implemented Interfaces:
Serializable
,Comparable<NatPmpUtil.ResultCode>
- Enclosing class:
- NatPmpUtil
public static enum NatPmpUtil.ResultCode extends Enum<NatPmpUtil.ResultCode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NETWORK_FAILURE
NOT_AUTHORIZED
OUT_OF_RESOURCES
SUCCESS
UNSUPPORTED_OPCODE
UNSUPPORTED_VERSION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NatPmpUtil.ResultCode
from(short number)
short
getNumber()
static NatPmpUtil.ResultCode
valueOf(String name)
Returns the enum constant of this type with the specified name.static NatPmpUtil.ResultCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final NatPmpUtil.ResultCode SUCCESS
-
UNSUPPORTED_VERSION
public static final NatPmpUtil.ResultCode UNSUPPORTED_VERSION
-
NOT_AUTHORIZED
public static final NatPmpUtil.ResultCode NOT_AUTHORIZED
-
NETWORK_FAILURE
public static final NatPmpUtil.ResultCode NETWORK_FAILURE
-
OUT_OF_RESOURCES
public static final NatPmpUtil.ResultCode OUT_OF_RESOURCES
-
UNSUPPORTED_OPCODE
public static final NatPmpUtil.ResultCode UNSUPPORTED_OPCODE
-
-
Method Detail
-
values
public static NatPmpUtil.ResultCode[] 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 (NatPmpUtil.ResultCode c : NatPmpUtil.ResultCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NatPmpUtil.ResultCode 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 nameNullPointerException
- if the argument is null
-
getNumber
public short getNumber()
-
from
public static NatPmpUtil.ResultCode from(short number)
-
-