com.h3c.util.pkt

## Class Mpls.Builder

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

- Enclosing class:
    Mpls

      public static class Mpls.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Mpls` | `build()` Creates a new protocol instance from this builder.
    `Mpls.Builder` | `headers(Mpls.Header[] headers)` Sets the headers.

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

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

- - ### Constructor Detail

    - #### Mpls.Builder

          public Mpls.Builder()

      Create a new builder using the defaults:

           headers = NO_HEADERS

    - #### Mpls.Builder

          public Mpls.Builder(Mpls mpls)

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

  - ### Method Detail

    - #### build

          public Mpls build()

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

    - #### headers

          public Mpls.Builder headers(Mpls.Header[] headers)

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

Copyright © 2014. All Rights Reserved.