com.h3c.util.pkt

## Class LldpTlv.Builder

- java.lang.Object
- - com.h3c.util.pkt.LldpTlv.Builder

- Direct Known Subclasses:
    LldpTlv.PrivateBuilder
  Enclosing class:
    LldpTlv

      public static class LldpTlv.Builder
      extends Object

  Builder (mutable) used to create a new instances.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LldpTlv.Builder()` Create a new builder using the defaults:
    `LldpTlv.Builder(LldpTlv.Type type)` Create a new builder based on the specified type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LldpTlv` | `build()` Creates a new TLV instance from this builder.
    `LldpTlv.Builder` | `bytes(byte[] bytes)` Sets the bytes array.
    `LldpTlv.Builder` | `chassisIdSubType(LldpTlv.ChassisIdSubType chassisIdSubType)` Sets the Chassis ID sub-type.
    `LldpTlv.Builder` | `enabled(LldpTlv.Capability... enabled)` Sets the list of enabled capabilities.
    `LldpTlv.Builder` | `enabledMask(int enabledMask)` Sets the list of enabled capabilities.
    `LldpTlv.Builder` | `ipAddr(IpAddress ipAddr)` Sets the IP address.
    `LldpTlv.Builder` | `macAddr(MacAddress macAddr)` Sets the MAC address.
    `LldpTlv.Builder` | `name(String name)` Sets the name.
    `LldpTlv.Builder` | `number(int number)` Sets the number (scalar).
    `LldpTlv.Builder` | `portIdSubType(LldpTlv.PortIdSubType portIdSubType)` Sets the Port ID sub-type.
    `LldpTlv.Builder` | `supported(LldpTlv.Capability... supported)` Sets the list of supported capabilities.
    `LldpTlv.Builder` | `supportedMask(int supportedMask)` Sets the list of supported capabilities.
    `LldpTlv.Builder` | `type(LldpTlv.Type type)` Sets the TLV type.

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

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

- - ### Constructor Detail

    - #### LldpTlv.Builder

          public LldpTlv.Builder()

      Create a new builder using the defaults:

           type = END
           bytes = EMPTY_BYTES
           supported = NO_CAPS
           enabled = NO_CAPS

    - #### LldpTlv.Builder

          public LldpTlv.Builder(LldpTlv.Type type)

      Create a new builder based on the specified type.
      Parameters:
        `type` - TLV type

  - ### Method Detail

    - #### build

          public LldpTlv build()

      Creates a new TLV instance from this builder.
      Returns:
        the new TLV instance

    - #### type

          public LldpTlv.Builder type(LldpTlv.Type type)

      Sets the TLV type.
      Parameters:
        `type` - TLV type
      Returns:
        this instance

    - #### bytes

          public LldpTlv.Builder bytes(byte[] bytes)

      Sets the bytes array.
      Parameters:
        `bytes` - array of bytes
      Returns:
        this instance

    - #### name

          public LldpTlv.Builder name(String name)

      Sets the name.
      Parameters:
        `name` - string name
      Returns:
        this instance

    - #### number

          public LldpTlv.Builder number(int number)

      Sets the number (scalar).
      Parameters:
        `number` - numeric value
      Returns:
        this instance

    - #### ipAddr

          public LldpTlv.Builder ipAddr(IpAddress ipAddr)

      Sets the IP address.
      Parameters:
        `ipAddr` - IP address
      Returns:
        this instance

    - #### macAddr

          public LldpTlv.Builder macAddr(MacAddress macAddr)

      Sets the MAC address.
      Parameters:
        `macAddr` - MAC address
      Returns:
        this instance

    - #### supportedMask

          public LldpTlv.Builder supportedMask(int supportedMask)

      Sets the list of supported capabilities.
      Parameters:
        `supportedMask` - capability mask
      Returns:
        this instance

    - #### supported

          public LldpTlv.Builder supported(LldpTlv.Capability... supported)

      Sets the list of supported capabilities.
      Parameters:
        `supported` - capability array
      Returns:
        this instance

    - #### enabledMask

          public LldpTlv.Builder enabledMask(int enabledMask)

      Sets the list of enabled capabilities. Must be a subset of the `LldpTlv.supported()` capabilities.
      Parameters:
        `enabledMask` - capability mask
      Returns:
        this instance

    - #### enabled

          public LldpTlv.Builder enabled(LldpTlv.Capability... enabled)

      Sets the list of enabled capabilities. Must be a subset of the `LldpTlv.supported()` capabilities.
      Parameters:
        `enabled` - capability array
      Returns:
        this instance

    - #### chassisIdSubType

          public LldpTlv.Builder chassisIdSubType(LldpTlv.ChassisIdSubType chassisIdSubType)

      Sets the Chassis ID sub-type.
      Parameters:
        `chassisIdSubType` - Chassis ID sub-type
      Returns:
        this instance

    - #### portIdSubType

          public LldpTlv.Builder portIdSubType(LldpTlv.PortIdSubType portIdSubType)

      Sets the Port ID sub-type.
      Parameters:
        `portIdSubType` - port ID sub-type
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.