com.h3c.of.lib.msg

## Enum GroupCapability

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

- All Implemented Interfaces:
    OfpBitmapEnum, OfpEnum, Serializable, Comparable<GroupCapability>

      public enum GroupCapability
      extends Enum<GroupCapability>
      implements OfpBitmapEnum

  Designates the capabilities of a group; Since 1.2.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CHAINING` Support chaining groups; Since 1.2.
    `CHAINING_CHECKS` Check chaining for loops and delete; Since 1.2.
    `SELECT_LIVENESS` Support liveness for select groups; Since 1.2.
    `SELECT_WEIGHT` Support weight for select groups; Since 1.2.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Set<GroupCapability>` | `decodeBitmap(int bitmap, ProtocolVersion pv)` Decodes the group capabilities flags and returns the set of corresponding constants.
    `static int` | `encodeBitmap(Set<GroupCapability> flags, ProtocolVersion pv)` Encodes a set of group capabilities flags as a bitmap.
    `int` | `getBit(ProtocolVersion pv)` Returns the bit value for the constant, under the given protocol version.
    `String` | `toDisplayString()` Returns a string representation of the constant, suitable for presentation in a display.
    `String` | `toString()`
    `static GroupCapability` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static GroupCapability[]` | `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, valueOf`

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

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

- - ### Enum Constant Detail

    - #### SELECT_WEIGHT

          public static final GroupCapability SELECT_WEIGHT

      Support weight for select groups; Since 1.2.

    - #### SELECT_LIVENESS

          public static final GroupCapability SELECT_LIVENESS

      Support liveness for select groups; Since 1.2.

    - #### CHAINING

          public static final GroupCapability CHAINING

      Support chaining groups; Since 1.2.

    - #### CHAINING_CHECKS

          public static final GroupCapability CHAINING_CHECKS

      Check chaining for loops and delete; Since 1.2.

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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

    - #### getBit

          public int getBit(ProtocolVersion pv)

      Description copied from interface: `OfpBitmapEnum`
      Returns the bit value for the constant, under the given protocol version.
      Specified by:
        `getBit` in interface `OfpBitmapEnum`
      Parameters:
        `pv` - the protocol version
      Returns:
        the bit value for the constant

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<GroupCapability>`

    - #### toDisplayString

          public String toDisplayString()

      Description copied from interface: `OfpBitmapEnum`
      Returns a string representation of the constant, suitable for presentation in a display.
      Specified by:
        `toDisplayString` in interface `OfpBitmapEnum`
      Returns:
        a display string for the constant

    - #### decodeBitmap

          public static Set<GroupCapability> decodeBitmap(int bitmap,
                                          ProtocolVersion pv)

      Decodes the group capabilities flags and returns the set of corresponding constants.
      Parameters:
        `bitmap` - the bitmap to decode
        `pv` - the protocol version
      Returns:
        the set of flags
      Throws:
        `VersionMismatchException` - if a bit position is not supported in the given version

    - #### encodeBitmap

          public static int encodeBitmap(Set<GroupCapability> flags,
                         ProtocolVersion pv)

      Encodes a set of group capabilities flags as a bitmap. The `flags` parameter may be null, 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 protocol version is null
        `VersionMismatchException` - if a flag is present that is not supported in the given protocol version

Copyright © 2014. All Rights Reserved.