com.h3c.of.lib.mp

## Class MBodyMutableMeterFeatures

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyMeterFeatures
    - - com.h3c.of.lib.mp.MBodyMutableMeterFeatures

- All Implemented Interfaces:
    MultipartBody, MutableObject, MutableStructure, Structure

      public class MBodyMutableMeterFeatures
      extends MBodyMeterFeatures
      implements MutableStructure

  Mutable subclass of `MBodyMeterFeatures`.

- - ### Field Summary

    - ### Fields inherited from class com.h3c.of.lib.OpenflowStructure

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyMutableMeterFeatures(ProtocolVersion pv)` Constructs a mutable multipart body MeterFeaturestype.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableMeterFeatures` | `bandTypes(Set<MeterBandType> types)` Sets the supported meter band types; Since 1.3.
    `MBodyMutableMeterFeatures` | `capabilities(Set<MeterFlag> caps)` Sets the supported meter capabilities; Since 1.3.
    `MBodyMutableMeterFeatures` | `maxBands(int max)` Sets the maximum number of supported bands per meter; Since 1.3.
    `MBodyMutableMeterFeatures` | `maxColor(int max)` Set the maximum supported color value; Since 1.3.
    `MBodyMutableMeterFeatures` | `maxMeters(long max)` Set the maximum number of meters supported; Since 1.3.
    `OpenflowStructure` | `toImmutable()` Returns an immutable instance of this structure.
    `String` | `toString()`
    `boolean` | `writable()` Returns true if this mutable object is still writable.

    - ### Methods inherited from class com.h3c.of.lib.mp.MBodyMeterFeatures

      `getBandTypes, getCapabilities, getMaxBands, getMaxColor, getMaxMeters, getTotalLength, toDebugString, toDebugString`

    - ### Methods inherited from class com.h3c.of.lib.OpenflowStructure

      `getVersion, hex, hex, validate`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.h3c.of.lib.Structure

      `getVersion, toDebugString`

    - ### Methods inherited from interface com.h3c.of.lib.mp.MultipartBody

      `validate`

- - ### Constructor Detail

    - #### MBodyMutableMeterFeatures

          public MBodyMutableMeterFeatures(ProtocolVersion pv)

      Constructs a mutable multipart body MeterFeaturestype.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### toImmutable

          public OpenflowStructure toImmutable()

      Description copied from interface: `MutableStructure`
      Returns an immutable instance of this structure. In essence, converts this structure to be read-only.

      It is expected that the reference to this mutable structure will be dropped. Note that all method calls invoked on a `MutableStructure` after `toImmutable()` has been invoked will result in an `InvalidMutableException` being thrown.

      Specified by:
        `toImmutable` in interface `MutableStructure`
      Returns:
        an immutable instance of this structure.

    - #### writable

          public boolean writable()

      Description copied from interface: `MutableObject`
      Returns true if this mutable object is still writable. That is, the `#toImmutable()` method (defined on a sub-interface) has not yet been invoked.
      Specified by:
        `writable` in interface `MutableObject`
      Returns:
        true if this mutable object is still writable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `MBodyMeterFeatures`

    - #### maxMeters

          public MBodyMutableMeterFeatures maxMeters(long max)

      Set the maximum number of meters supported; Since 1.3. Note that this must be an unsigned 32-bit value.
      Parameters:
        `max` - the maximum number of meters
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if max is not u32

    - #### bandTypes

          public MBodyMutableMeterFeatures bandTypes(Set<MeterBandType> types)

      Sets the supported meter band types; Since 1.3.
      Parameters:
        `types` - the supported meter band types
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if types is null

    - #### capabilities

          public MBodyMutableMeterFeatures capabilities(Set<MeterFlag> caps)

      Sets the supported meter capabilities; Since 1.3.
      Parameters:
        `caps` - the capabilities
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if caps is null

    - #### maxBands

          public MBodyMutableMeterFeatures maxBands(int max)

      Sets the maximum number of supported bands per meter; Since 1.3. Note that this must be an unsigned 8-bit value.
      Parameters:
        `max` - the maximum bands per meter
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if max is not u8

    - #### maxColor

          public MBodyMutableMeterFeatures maxColor(int max)

      Set the maximum supported color value; Since 1.3. Note that this must be an unsigned 8-bit value.
      Parameters:
        `max` - the maximum color value
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if max is not u8

Copyright © 2014. All Rights Reserved.