- java.lang.Object
-
- org.refcodes.serial.StringSegment.Builder
-
- Enclosing class:
- StringSegment
public static final class StringSegment.Builder extends Object
Builder to buildStringSegment.
-
-
Method Summary
All Methods Instance Methods Concrete Methods 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 Detail
-
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 thisStringSegment.- Returns:
- The according builder.
-
withEncoding
public StringSegment.Builder withEncoding(Charset aEncoding)
Builder method for the encoding.
-
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- TheEndianessto be used for length values.- Returns:
- The according builder.
-
build
public StringSegment build()
Builds the accordingly configuredStringSegmentinstance.- Returns:
- The
StringSegmentbeing configured.
-
-