Enum 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 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 name
        NullPointerException - 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