com.h3c.of.lib.msg

## Enum GroupType

- java.lang.Object
- - java.lang.Enum<GroupType>
  - - com.h3c.of.lib.msg.GroupType

- All Implemented Interfaces:
    OfpCodeBasedEnum, OfpEnum, Serializable, Comparable<GroupType>

      public enum GroupType
      extends Enum<GroupType>
      implements OfpCodeBasedEnum

  Designates group types; Since 1.1.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALL` All (multicast/broadcast) group; Since 1.1.
    `FF` Fast failover group; Since 1.1.
    `INDIRECT` Indirect group; Since 1.1.
    `SELECT` Select group; Since 1.1.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GroupType` | `decode(int code, ProtocolVersion pv)` Decodes the group type code and returns the corresponding constant.
    `static Set<GroupType>` | `decodeFlags(int bitmap, ProtocolVersion pv)` Decodes the group type flags, based on the code associated with the flags, and returns the set of corresponding constants.
    `static int` | `encodeFlags(Set<GroupType> flags, ProtocolVersion pv)` Encodes a set of group type flags as a bitmap.
    `int` | `getCode(ProtocolVersion pv)` Returns the code for the constant, under the given protocol version.
    `static GroupType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static GroupType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ALL

          public static final GroupType ALL

      All (multicast/broadcast) group; Since 1.1.

    - #### SELECT

          public static final GroupType SELECT

      Select group; Since 1.1.

    - #### INDIRECT

          public static final GroupType INDIRECT

      Indirect group; Since 1.1.

    - #### FF

          public static final GroupType FF

      Fast failover group; Since 1.1.

  - ### Method Detail

    - #### values

          public static GroupType[] 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 (GroupType c : GroupType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static GroupType 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

    - #### getCode

          public int getCode(ProtocolVersion pv)

      Description copied from interface: `OfpCodeBasedEnum`
      Returns the code for the constant, under the given protocol version.
      Specified by:
        `getCode` in interface `OfpCodeBasedEnum`
      Parameters:
        `pv` - the protocol version
      Returns:
        the code for the constant

    - #### decode

          public static GroupType decode(int code,
                         ProtocolVersion pv)
                                  throws DecodeException

      Decodes the group type code and returns the corresponding constant. If the code is not recognized, an exception is thrown.
      Parameters:
        `code` - the encoded type
        `pv` - the protocol version
      Returns:
        the group type
      Throws:
        `DecodeException` - if the code is not recognized
        `VersionMismatchException` - if the group type is not supported in the given version

    - #### decodeFlags

          public static Set<GroupType> decodeFlags(int bitmap,
                                   ProtocolVersion pv)

      Decodes the group type flags, based on the code associated with the flags, and returns the set of corresponding constants.
      Parameters:
        `bitmap` - the bitmap to decode
        `pv` - the protocol version
      Returns:
        the set of flags
      Throws:
        `NullPointerException` - if protocol version is null
        `VersionMismatchException` - if a bit position is not supported in the given version

    - #### encodeFlags

          public static int encodeFlags(Set<GroupType> flags,
                        ProtocolVersion pv)

      Encodes a set of group type flags as a bitmap. The `flags` parameter may be empty, in which case a bitmap of 0 (zero) is returned.
      Parameters:
        `flags` - the flags to encode
        `pv` - the protocol version
      Returns:
        the flags encoded as a bitmap
      Throws:
        `NullPointerException` - if either parameter is null
        `IllegalArgumentException` - if code associated with enumeration constant is outside the valid range (0 - 31)
        `VersionMismatchException` - if a flag is present that is not supported in the given protocol version

Copyright © 2014. All Rights Reserved.