com.h3c.util.pkt

## Class Arp.Builder

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

- Enclosing class:
    Arp

      public static class Arp.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Arp` | `build()` Creates a new protocol instance from this builder.
    `Arp.Builder` | `hwType(HardwareType hwType)` Sets the hardware type.
    `Arp.Builder` | `opCode(Arp.OpCode opCode)` Sets the operation code.
    `Arp.Builder` | `senderIpAddr(IpAddress senderIpAddr)` Sets the sender IP address.
    `Arp.Builder` | `senderMacAddr(MacAddress senderMacAddr)` Sets the sender MAC address.
    `Arp.Builder` | `targetIpAddr(IpAddress targetIpAddr)` Sets the target IP address.
    `Arp.Builder` | `targetMacAddr(MacAddress targetMacAddr)` Sets the target MAC address.

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

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

- - ### Constructor Detail

    - #### Arp.Builder

          public Arp.Builder()

      Create a new builder using the defaults:

           hwType = ETHERNET
           opCode = REQ

    - #### Arp.Builder

          public Arp.Builder(Arp arp)

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

  - ### Method Detail

    - #### build

          public Arp build()

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

    - #### hwType

          public Arp.Builder hwType(HardwareType hwType)

      Sets the hardware type.
      Parameters:
        `hwType` - hardware type enumeration
      Returns:
        this instance

    - #### opCode

          public Arp.Builder opCode(Arp.OpCode opCode)

      Sets the operation code.
      Parameters:
        `opCode` - operation code enumeration
      Returns:
        this instance

    - #### senderMacAddr

          public Arp.Builder senderMacAddr(MacAddress senderMacAddr)

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

    - #### senderIpAddr

          public Arp.Builder senderIpAddr(IpAddress senderIpAddr)

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

    - #### targetMacAddr

          public Arp.Builder targetMacAddr(MacAddress targetMacAddr)

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

    - #### targetIpAddr

          public Arp.Builder targetIpAddr(IpAddress targetIpAddr)

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

Copyright © 2014. All Rights Reserved.