- 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 StringSegment
build()
Builds the accordingly configuredStringSegment
instance.StringSegment.Builder
withAlias(String aAlias)
Builder method for the alias.StringSegment.Builder
withEncoding(Charset aEncoding)
Builder method for the encoding.StringSegment.Builder
withEndianess(org.refcodes.numerical.Endianess aEndianess)
Builder method for the endianess.StringSegment.Builder
withLengthWidth(int aLengthWidth)
Builder method for the length width.StringSegment.Builder
withValue(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
- TheEndianess
to be used for length values.- Returns:
- The according builder.
-
build
public StringSegment build()
Builds the accordingly configuredStringSegment
instance.- Returns:
- The
StringSegment
being configured.
-
-