Package Summary Overview Summary

Module java.base
Package java.lang.foreign

# Interface VaList.Builder

Enclosing interface:
  `VaListPREVIEW`

public static sealed interface VaList.Builder
`Builder` is a preview API of the Java platform.
Programs can only use `Builder` when preview features are enabled.
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 list PREVIEW.

Since:
  19

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VaList.BuilderPREVIEW`
  `addVarg (GroupLayoutPREVIEW layout, MemorySegmentPREVIEW value)`
  Writes a `MemorySegment` value, with the given layout, to the variable argument list being constructed.
  `VaList.BuilderPREVIEW`
  `addVarg (ValueLayout.OfAddressPREVIEW layout, AddressablePREVIEW value)`
  Writes an `Addressable` value to the variable argument list being constructed.
  `VaList.BuilderPREVIEW`
  `addVarg (ValueLayout.OfDoublePREVIEW layout, double value)`
  Writes a `double` value to the variable argument list being constructed.
  `VaList.BuilderPREVIEW`
  `addVarg (ValueLayout.OfIntPREVIEW layout, int value)`
  Writes an `int` value to the variable argument list being constructed.
  `VaList.BuilderPREVIEW`
  `addVarg (ValueLayout.OfLongPREVIEW layout, long value)`
  Writes a `long` value to the variable argument list being constructed.

- ## Method Details

  - ### addVarg

    VaList.BuilderPREVIEW addVarg (ValueLayout.OfIntPREVIEW layout, int value)
    Writes an `int` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `int` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.BuilderPREVIEW addVarg (ValueLayout.OfLongPREVIEW layout, long value)
    Writes a `long` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `long` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.BuilderPREVIEW addVarg (ValueLayout.OfDoublePREVIEW layout, double value)
    Writes a `double` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `double` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.BuilderPREVIEW addVarg (ValueLayout.OfAddressPREVIEW layout, AddressablePREVIEW value)
    Writes an `Addressable` value to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `Addressable` value to be written.
    Returns:
      this builder.

  - ### addVarg

    VaList.BuilderPREVIEW addVarg (GroupLayoutPREVIEW layout, MemorySegmentPREVIEW value)
    Writes a `MemorySegment` value, with the given layout, to the variable argument list being constructed.
    Parameters:
      `layout` - the layout of the value to be written.
      `value` - the `MemorySegment` whose contents will be copied.
    Returns:
      this builder.