Package org.onlab.packet
Enum DscpClass
- java.lang.Object
-
- java.lang.Enum<DscpClass>
-
- org.onlab.packet.DscpClass
-
- All Implemented Interfaces:
Serializable
,Comparable<DscpClass>
public enum DscpClass extends Enum<DscpClass>
Represents the DiffServ classes defined by the IPv4/IPv6 DSCP value. DSCP occupies the 6 most-significant bits of the IPv4/IPv6 DS field
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DscpClass
fromShort(short value)
Returns the DSCP class Enum corresponding to the specified short.short
getDropPrecedence()
Returns the corresponding drop precedence.IPPrecedence
getIPPrecedence()
Returns the corresponding IP precedence.short
getValue()
Returns the short value of this DSCP class Enum.static DscpClass
valueOf(String name)
Returns the enum constant of this type with the specified name.static DscpClass[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BE
public static final DscpClass BE
-
AF11
public static final DscpClass AF11
-
AF12
public static final DscpClass AF12
-
AF13
public static final DscpClass AF13
-
AF21
public static final DscpClass AF21
-
AF22
public static final DscpClass AF22
-
AF23
public static final DscpClass AF23
-
AF31
public static final DscpClass AF31
-
AF32
public static final DscpClass AF32
-
AF33
public static final DscpClass AF33
-
AF41
public static final DscpClass AF41
-
AF42
public static final DscpClass AF42
-
AF43
public static final DscpClass AF43
-
CS1
public static final DscpClass CS1
-
CS2
public static final DscpClass CS2
-
CS3
public static final DscpClass CS3
-
CS4
public static final DscpClass CS4
-
CS5
public static final DscpClass CS5
-
CS6
public static final DscpClass CS6
-
CS7
public static final DscpClass CS7
-
EF
public static final DscpClass EF
-
-
Method Detail
-
values
public static DscpClass[] 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 (DscpClass c : DscpClass.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DscpClass 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 DscpClass fromShort(short value)
Returns the DSCP class Enum corresponding to the specified short.- Parameters:
value
- the short value of the DSCP class- Returns:
- the DSCP class Enum corresponding to the specified short
- Throws:
IllegalArgumentException
- if the short provided does not correspond to an DSCP class Enum value
-
getValue
public short getValue()
Returns the short value of this DSCP class Enum.- Returns:
- the short value of this DSCP class Enum
-
getIPPrecedence
public IPPrecedence getIPPrecedence()
Returns the corresponding IP precedence.- Returns:
- the corresponding IP precedence
-
getDropPrecedence
public short getDropPrecedence()
Returns the corresponding drop precedence.- Returns:
- the corresponding drop precedence
-
-