com.h3c.util.pkt

## Class Sctp.Builder

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

- Enclosing class:
    Sctp

      public static class Sctp.Builder
      extends Object

  Builder (mutable) used to create new protocol instances.

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Sctp` | `build()` Creates a new protocol instance from this builder.
    `Sctp.Builder` | `checkSumType(Sctp.CheckSumType checkSumType)` Sets the checksum algorithm type.
    `Sctp.Builder` | `chunks(Sctp.Chunk[] chunks)` Sets the chunks array.
    `Sctp.Builder` | `dstPort(int dstPort)` Sets the destination port.
    `Sctp.Builder` | `srcPort(int 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

    - #### Sctp.Builder

          public Sctp.Builder()

      Create a new builder using the defaults:

           checkSumType = CRC32C
           chunks = NO_CHUNKS

    - #### Sctp.Builder

          public Sctp.Builder(Sctp sctp)

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

  - ### Method Detail

    - #### build

          public Sctp build()

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

    - #### checkSumType

          public Sctp.Builder checkSumType(Sctp.CheckSumType checkSumType)

      Sets the checksum algorithm type.
      Parameters:
        `checkSumType` - checksum algorithm type
      Returns:
        this instance

    - #### srcPort

          public Sctp.Builder srcPort(int srcPort)

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

    - #### dstPort

          public Sctp.Builder dstPort(int dstPort)

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

    - #### chunks

          public Sctp.Builder chunks(Sctp.Chunk[] chunks)

      Sets the chunks array.
      Parameters:
        `chunks` - chunks array
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.