com.h3c.util.pkt

## Class Lldp.Builder

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

- Enclosing class:
    Lldp

      public static class Lldp.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Lldp.Builder()` Create a new builder using the defaults:
    `Lldp.Builder(Lldp lldp)` Copy constructor builder initialized from the passed in protocol.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Lldp` | `build()` Creates a new protocol instance from this builder.
    `Lldp.Builder` | `chassisId(LldpTlv chassisId)` Sets the chassis ID.
    `Lldp.Builder` | `options(LldpTlv[] options)` Sets the options array.
    `Lldp.Builder` | `portId(LldpTlv portId)` Sets the port ID.
    `Lldp.Builder` | `privateOptions(LldpTlv[] privateOptions)` Sets the private options array.
    `Lldp.Builder` | `ttl(LldpTlv ttl)` Sets the time to live value.

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

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

- - ### Constructor Detail

    - #### Lldp.Builder

          public Lldp.Builder()

      Create a new builder using the defaults:

           options = NO_OPTIONS
           privateOptions = NO_OPTIONS

    - #### Lldp.Builder

          public Lldp.Builder(Lldp lldp)

      Copy constructor builder initialized from the passed in protocol.
      Parameters:
        `lldp` - builder is initialed from this protocol's data

  - ### Method Detail

    - #### build

          public Lldp build()

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

    - #### chassisId

          public Lldp.Builder chassisId(LldpTlv chassisId)

      Sets the chassis ID.
      Parameters:
        `chassisId` - chassis ID
      Returns:
        this instance

    - #### portId

          public Lldp.Builder portId(LldpTlv portId)

      Sets the port ID.
      Parameters:
        `portId` - port ID
      Returns:
        this instance

    - #### ttl

          public Lldp.Builder ttl(LldpTlv ttl)

      Sets the time to live value.
      Parameters:
        `ttl` - time to live value
      Returns:
        this instance

    - #### options

          public Lldp.Builder options(LldpTlv[] options)

      Sets the options array. Note that there is a separate method `privateOptions(LldpTlv[])` used to set the private options.
      Parameters:
        `options` - array of options
      Returns:
        this instance

    - #### privateOptions

          public Lldp.Builder privateOptions(LldpTlv[] privateOptions)

      Sets the private options array. Note that there is a separate method `options(LldpTlv[])` used to set the non-private options.
      Parameters:
        `privateOptions` - array of private options
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.