Package org.onlab.packet
Enum IPPrecedence
- java.lang.Object
-
- java.lang.Enum<IPPrecedence>
-
- org.onlab.packet.IPPrecedence
-
- All Implemented Interfaces:
Serializable
,Comparable<IPPrecedence>
public enum IPPrecedence extends Enum<IPPrecedence>
Represents the deprecated IPv4 IP precedence. IP precedence occupied the 3 most-significant bits of the IPv4 ToS field
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEST_EFFORT
CRITICAL
FLASH
FLASH_OVERRIDE
IMMEDIATE
INTERNETWORK_CONTROL
NETWORK_CONTROL
PRIORITY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IPPrecedence
fromShort(short value)
Returns the IP precedence Enum corresponding to the specified short.short
getValue()
Returns the short value of this IP precedence Enum.static IPPrecedence
valueOf(String name)
Returns the enum constant of this type with the specified name.static IPPrecedence[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BEST_EFFORT
public static final IPPrecedence BEST_EFFORT
-
PRIORITY
public static final IPPrecedence PRIORITY
-
IMMEDIATE
public static final IPPrecedence IMMEDIATE
-
FLASH
public static final IPPrecedence FLASH
-
FLASH_OVERRIDE
public static final IPPrecedence FLASH_OVERRIDE
-
CRITICAL
public static final IPPrecedence CRITICAL
-
INTERNETWORK_CONTROL
public static final IPPrecedence INTERNETWORK_CONTROL
-
NETWORK_CONTROL
public static final IPPrecedence NETWORK_CONTROL
-
-
Method Detail
-
values
public static IPPrecedence[] 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 (IPPrecedence c : IPPrecedence.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IPPrecedence 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
-
fromShort
public static IPPrecedence fromShort(short value)
Returns the IP precedence Enum corresponding to the specified short.- Parameters:
value
- the short value of the IP precedence- Returns:
- the IP precedence Enum corresponding to the specified short
- Throws:
IllegalArgumentException
- if the short provided does not correspond to an IP precedence Enum value
-
getValue
public short getValue()
Returns the short value of this IP precedence Enum.- Returns:
- the short value of this IP precedence Enum
-
-