Class FrameBuilder

  • All Implemented Interfaces:

    
    public final class FrameBuilder
    
                        

    Builder class to create instances of the Frame type

    Since:

    2.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      FrameBuilder()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • FrameBuilder

        FrameBuilder()
    • Method Detail

      • timestamp

         final FrameBuilder timestamp(Instant timestamp)

        Timestamp specified in the frame as the creation time.

        The call is optional. If the timestamp is null at the time build is called, a new timestamp is generated. See Instant.now

        Returns:

        this reference

        Since:

        2.0

      • addData

         final FrameBuilder addData(Data toAdd)

        Adds a single data block

        Parameters:
        toAdd - Data block to be added
        Returns:

        this reference

        Since:

        2.0

      • addData

         final FrameBuilder addData(Collection<Data> toAdd)

        Adds all data to the passed toAdd collection.

        Parameters:
        toAdd - Data blocks to be added
        Returns:

        this reference

        Since:

        2.0

      • addData

         final FrameBuilder addData(Data toAdd)

        Adds all data of the passed toAdd parameters.

        Parameters:
        toAdd - Data blocks to be added
        Returns:

        this reference

        Since:

        2.0

      • build

         final Frame build()

        Creates a new frame based on the previously configured parameters

        Returns:

        RSCP Frame

        Since:

        2.0