com.h3c.util.pkt

## Class IcmpV6.Builder

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

- Enclosing class:
    IcmpV6

      public static class IcmpV6.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IcmpV6` | `build()` Creates a new protocol instance from this builder.
    `IcmpV6.Builder` | `bytes(byte[] bytes)` Sets the payload bytes.
    `IcmpV6.Builder` | `neighborAdvertiseData(IcmpV6.NeighborAdvertiseData naData)` Sets the neighbor advertise data and the appropriate type/code.
    `IcmpV6.Builder` | `neighborSolicitData(IcmpV6.NeighborSolicitData nsData)` Sets the neighbor solicitation data and the appropriate type/code.
    `IcmpV6.Builder` | `options(IcmpOptionV6[] options)` Sets the options.
    `IcmpV6.Builder` | `redirectData(IcmpV6.RedirectData rData)` Sets the redirect message data and the appropriate type/code.
    `IcmpV6.Builder` | `routerAdvertiseData(IcmpV6.RouterAdvertiseData raData)` Sets the router advertise data and the appropriate type/code.
    `IcmpV6.Builder` | `typeCode(IcmpTypeCodeV6 typeCode)` Sets the type/code enumeration..

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

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

- - ### Constructor Detail

    - #### IcmpV6.Builder

          public IcmpV6.Builder()

      Create a new builder using the defaults:

           typeCode = NONE
           bytes = EMPTY_BYTES
           routerAdvertiseData = null
           neighborSolicitData = null
           neighborAdvertiseData = null
           redirectData = null
           options = NO_OPTIONS

    - #### IcmpV6.Builder

          public IcmpV6.Builder(IcmpV6 icmp)

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

  - ### Method Detail

    - #### build

          public IcmpV6 build()

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

    - #### typeCode

          public IcmpV6.Builder typeCode(IcmpTypeCodeV6 typeCode)

      Sets the type/code enumeration..
      Parameters:
        `typeCode` - type/code enumeration
      Returns:
        this instance

    - #### bytes

          public IcmpV6.Builder bytes(byte[] bytes)

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

    - #### routerAdvertiseData

          public IcmpV6.Builder routerAdvertiseData(IcmpV6.RouterAdvertiseData raData)

      Sets the router advertise data and the appropriate type/code.
      Parameters:
        `raData` - router advertise data
      Returns:
        this instance

    - #### neighborSolicitData

          public IcmpV6.Builder neighborSolicitData(IcmpV6.NeighborSolicitData nsData)

      Sets the neighbor solicitation data and the appropriate type/code.
      Parameters:
        `nsData` - neighbor solicitation data
      Returns:
        this instance

    - #### neighborAdvertiseData

          public IcmpV6.Builder neighborAdvertiseData(IcmpV6.NeighborAdvertiseData naData)

      Sets the neighbor advertise data and the appropriate type/code.
      Parameters:
        `naData` - neighbor advertise data
      Returns:
        this instance

    - #### redirectData

          public IcmpV6.Builder redirectData(IcmpV6.RedirectData rData)

      Sets the redirect message data and the appropriate type/code.
      Parameters:
        `rData` - redirect message data
      Returns:
        this instance

    - #### options

          public IcmpV6.Builder options(IcmpOptionV6[] options)

      Sets the options.
      Parameters:
        `options` - option array
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.