java.lang.Object
org.refcodes.serial.StringSegment.Builder
- Enclosing class:
- StringSegment
public static final class StringSegment.Builder extends Object
Builder to build
StringSegment.-
Method Summary
Modifier and Type Method Description StringSegmentbuild()Builds the accordingly configuredStringSegmentinstance.StringSegment.BuilderwithAlias(String aAlias)Builder method for the alias.StringSegment.BuilderwithEncoding(Charset aEncoding)Builder method for the encoding.StringSegment.BuilderwithEndianess(org.refcodes.numerical.Endianess aEndianess)Builder method for the endianess.StringSegment.BuilderwithLengthWidth(int aLengthWidth)Builder method for the length width.StringSegment.BuilderwithValue(String aValue)Builder method for the value.
-
Method Details
-
withAlias
Builder method for the alias.- Parameters:
aAlias- The alias which identifies the content of this segment.- Returns:
- The according builder.
-
withValue
Builder method for the value.- Parameters:
aValue- The payload to be contained by thisStringSegment.- Returns:
- The according builder.
-
withEncoding
Builder method for the encoding. -
withLengthWidth
Builder method for the length width.- Parameters:
aLengthWidth- The width (in bytes) to be used for length values.- Returns:
- The according builder.
-
withEndianess
Builder method for the endianess.- Parameters:
aEndianess- TheEndianessto be used for length values.- Returns:
- The according builder.
-
build
Builds the accordingly configuredStringSegmentinstance.- Returns:
- The
StringSegmentbeing configured.
-