Class StringSegment.Builder

java.lang.Object
org.refcodes.serial.StringSegment.Builder
Enclosing class:
StringSegment

public static final class StringSegment.Builder extends Object
Builder to build StringSegment.
  • Method Details

    • withAlias

      public StringSegment.Builder withAlias(String aAlias)
      Builder method for the alias.
      Parameters:
      aAlias - The alias which identifies the content of this segment.
      Returns:
      The according builder.
    • withValue

      public StringSegment.Builder withValue(String aValue)
      Builder method for the value.
      Parameters:
      aValue - The payload to be contained by this StringSegment.
      Returns:
      The according builder.
    • withEncoding

      public StringSegment.Builder withEncoding(Charset aEncoding)
      Builder method for the encoding.
      Parameters:
      aEncoding - The Charset to be used for encoding the String.
      Returns:
      The according builder.
    • withLengthWidth

      public StringSegment.Builder withLengthWidth(int aLengthWidth)
      Builder method for the length width.
      Parameters:
      aLengthWidth - The width (in bytes) to be used for length values.
      Returns:
      The according builder.
    • withEndianess

      public StringSegment.Builder withEndianess(org.refcodes.numerical.Endianess aEndianess)
      Builder method for the endianess.
      Parameters:
      aEndianess - The Endianess to be used for length values.
      Returns:
      The according builder.
    • build

      public StringSegment build()
      Builds the accordingly configured StringSegment instance.
      Returns:
      The StringSegment being configured.