public static sealed interface VaList.Builder
Builder
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A builder used to construct a variable argument listPREVIEW.
- Since:
- 19
-
Method Summary
Modifier and TypeMethodDescriptionaddVarg
(GroupLayoutPREVIEW layout, MemorySegmentPREVIEW value) Writes aMemorySegment
, with the given layout, to the variable argument list being constructed.addVarg
(ValueLayout.OfAddressPREVIEW layout, MemorySegmentPREVIEW segment) addVarg
(ValueLayout.OfDoublePREVIEW layout, double value) Writes adouble
value to the variable argument list being constructed.addVarg
(ValueLayout.OfIntPREVIEW layout, int value) Writes anint
value to the variable argument list being constructed.addVarg
(ValueLayout.OfLongPREVIEW layout, long value) Writes along
value to the variable argument list being constructed.
-
Method Details
-
addVarg
Writes anint
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- theint
value to be written.- Returns:
- this builder.
-
addVarg
Writes along
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- thelong
value to be written.- Returns:
- this builder.
-
addVarg
Writes adouble
value to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- thedouble
value to be written.- Returns:
- this builder.
-
addVarg
-
addVarg
Writes aMemorySegment
, with the given layout, to the variable argument list being constructed.- Parameters:
layout
- the layout of the value to be written.value
- theMemorySegment
whose contents will be copied.- Returns:
- this builder.
-
Builder
when preview features are enabled.