Package org.opennms.jicmp.ip
Enum IPPacket.Protocol
- java.lang.Object
-
- java.lang.Enum<IPPacket.Protocol>
-
- org.opennms.jicmp.ip.IPPacket.Protocol
-
- All Implemented Interfaces:
Serializable
,Comparable<IPPacket.Protocol>
- Enclosing class:
- IPPacket
public static enum IPPacket.Protocol extends Enum<IPPacket.Protocol>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ICMP
TCP
UDP
V6_OVER_V4
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCode()
static IPPacket.Protocol
toProtocol(int code)
static IPPacket.Protocol
valueOf(String name)
Returns the enum constant of this type with the specified name.static IPPacket.Protocol[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ICMP
public static final IPPacket.Protocol ICMP
-
TCP
public static final IPPacket.Protocol TCP
-
UDP
public static final IPPacket.Protocol UDP
-
V6_OVER_V4
public static final IPPacket.Protocol V6_OVER_V4
-
-
Method Detail
-
values
public static IPPacket.Protocol[] 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 (IPPacket.Protocol c : IPPacket.Protocol.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IPPacket.Protocol 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
-
getCode
public int getCode()
-
toProtocol
public static IPPacket.Protocol toProtocol(int code)
-
-