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 aMemorySegmentvalue, with the given layout, to the variable argument list being constructed.addVarg(ValueLayout.OfAddressPREVIEW layout, AddressablePREVIEW value) Writes anAddressablevalue to the variable argument list being constructed.addVarg(ValueLayout.OfDoublePREVIEW layout, double value) Writes adoublevalue to the variable argument list being constructed.addVarg(ValueLayout.OfIntPREVIEW layout, int value) Writes anintvalue to the variable argument list being constructed.addVarg(ValueLayout.OfLongPREVIEW layout, long value) Writes alongvalue to the variable argument list being constructed.
-
Method Details
-
addVarg
Writes anintvalue to the variable argument list being constructed.- Parameters:
layout- the layout of the value to be written.value- theintvalue to be written.- Returns:
- this builder.
-
addVarg
Writes alongvalue to the variable argument list being constructed.- Parameters:
layout- the layout of the value to be written.value- thelongvalue to be written.- Returns:
- this builder.
-
addVarg
Writes adoublevalue to the variable argument list being constructed.- Parameters:
layout- the layout of the value to be written.value- thedoublevalue to be written.- Returns:
- this builder.
-
addVarg
Writes anAddressablevalue to the variable argument list being constructed.- Parameters:
layout- the layout of the value to be written.value- theAddressablevalue to be written.- Returns:
- this builder.
-
addVarg
Writes aMemorySegmentvalue, with the given layout, to the variable argument list being constructed.- Parameters:
layout- the layout of the value to be written.value- theMemorySegmentwhose contents will be copied.- Returns:
- this builder.
-
Builderwhen preview features are enabled.