com.h3c.util.pkt

## Class PppEthernet.Builder

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

- Enclosing class:
    PppEthernet

      public static class PppEthernet.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PppEthernet` | `build()` Creates a new protocol instance from this builder.
    `PppEthernet.Builder` | `bytes(byte[] bytes)` Sets the payload bytes.
    `PppEthernet.Builder` | `code(PppEthernet.Code code)` Sets the PPPoE code.
    `PppEthernet.Builder` | `pppProtocolId(PppEthernet.PppProtocolId pppProtocolId)` Sets the PPPoE protocol ID.
    `PppEthernet.Builder` | `sessionId(int sessionId)` Sets the PPPoE session ID.
    `PppEthernet.Builder` | `type(int type)` Sets the PPPoE type.
    `PppEthernet.Builder` | `version(int version)` Sets the PPPoE version.

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

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

- - ### Constructor Detail

    - #### PppEthernet.Builder

          public PppEthernet.Builder()

      Create a new builder using the defaults:

           version = 1
           type = 1
           code = SESSION_DATA
           sessionId = 0
           pppProtocolId = PPP_IP
           bytes = EMPTY_BYTES

    - #### PppEthernet.Builder

          public PppEthernet.Builder(PppEthernet pppe)

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

  - ### Method Detail

    - #### build

          public PppEthernet build()

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

    - #### version

          public PppEthernet.Builder version(int version)

      Sets the PPPoE version.
      Parameters:
        `version` - PPPoE version
      Returns:
        this instance

    - #### type

          public PppEthernet.Builder type(int type)

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

    - #### sessionId

          public PppEthernet.Builder sessionId(int sessionId)

      Sets the PPPoE session ID.
      Parameters:
        `sessionId` - PPPoE session ID
      Returns:
        this instance

    - #### code

          public PppEthernet.Builder code(PppEthernet.Code code)

      Sets the PPPoE code.
      Parameters:
        `code` - PPPoE code
      Returns:
        this instance

    - #### pppProtocolId

          public PppEthernet.Builder pppProtocolId(PppEthernet.PppProtocolId pppProtocolId)

      Sets the PPPoE protocol ID.
      Parameters:
        `pppProtocolId` - PPPoE protocol ID
      Returns:
        this instance

    - #### bytes

          public PppEthernet.Builder bytes(byte[] bytes)

      Sets the payload bytes.
      Parameters:
        `bytes` - payload bytes
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.