com.h3c.util.pkt

## Class Udp.Builder

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

- Enclosing class:
    Udp

      public static class Udp.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Udp` | `build()` Creates a new protocol instance from this builder.
    `Udp.Builder` | `dstPort(TcpUdpPort dstPort)` Sets the destination port.
    `Udp.Builder` | `srcPort(TcpUdpPort srcPort)` Sets the source port.

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

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

- - ### Constructor Detail

    - #### Udp.Builder

          public Udp.Builder()

      Create a new builder using the defaults:

           srcPort = null
           dstPort = null

    - #### Udp.Builder

          public Udp.Builder(Udp udp)

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

  - ### Method Detail

    - #### build

          public Udp build()

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

    - #### srcPort

          public Udp.Builder srcPort(TcpUdpPort srcPort)

      Sets the source port.
      Parameters:
        `srcPort` - source port
      Returns:
        this instance

    - #### dstPort

          public Udp.Builder dstPort(TcpUdpPort dstPort)

      Sets the destination port.
      Parameters:
        `dstPort` - destination port
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.