java.lang.Object
org.refcodes.serial.StringSegment.Builder
- Enclosing class:
- StringSegment
Builder to build
StringSegment.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the accordingly configuredStringSegmentinstance.Builder method for the alias.withEncoding(Charset aEncoding) Builder method for the encoding.withEndianess(org.refcodes.numerical.Endianess aEndianess) Builder method for the endianess.withLengthWidth(int aLengthWidth) Builder method for the length width.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.
-