# Class VulkanSwapChainImageAcquisition.Builder

java.lang.Object
com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanSwapChainImageAcquisition.Builder

Enclosing class:
  `VulkanSwapChainImageAcquisition`

public static final class VulkanSwapChainImageAcquisition.Builder extends Object
Builds instances of type `VulkanSwapChainImageAcquisition`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

`Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VulkanSwapChainImageAcquisition`
  `build()`
  Builds a new `VulkanSwapChainImageAcquisition`.
  `final VulkanSwapChainImageAcquisition.Builder`
  `from(VulkanSwapChainImageAcquisitionType instance)`
  Fill a builder with attribute values from the provided `VulkanSwapChainImageAcquisitionType` instance.
  `final VulkanSwapChainImageAcquisition.Builder`
  `setImageIndex(int imageIndex)`
  Initializes the optional value `imageIndex` to imageIndex.
  `final VulkanSwapChainImageAcquisition.Builder`
  `setImageIndex(OptionalInt imageIndex)`
  Initializes the optional value `imageIndex` to imageIndex.
  `final VulkanSwapChainImageAcquisition.Builder`
  `setSubOptimal(boolean subOptimal)`
  Initializes the value for the `subOptimal` attribute.
  `final VulkanSwapChainImageAcquisition.Builder`
  `setTimedOut(boolean timedOut)`
  Initializes the value for the `timedOut` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final VulkanSwapChainImageAcquisition.Builder from(VulkanSwapChainImageAcquisitionType instance)
    Fill a builder with attribute values from the provided `VulkanSwapChainImageAcquisitionType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageIndex

    public final VulkanSwapChainImageAcquisition.Builder setImageIndex(int imageIndex)
    Initializes the optional value `imageIndex` to imageIndex.
    Parameters:
      `imageIndex` - The value for imageIndex
    Returns:
      `this` builder for chained invocation

  - ### setImageIndex

    public final VulkanSwapChainImageAcquisition.Builder setImageIndex(OptionalInt imageIndex)
    Initializes the optional value `imageIndex` to imageIndex.
    Parameters:
      `imageIndex` - The value for imageIndex
    Returns:
      `this` builder for use in a chained invocation

  - ### setSubOptimal

    public final VulkanSwapChainImageAcquisition.Builder setSubOptimal(boolean subOptimal)
    Initializes the value for the `subOptimal` attribute.
    Parameters:
      `subOptimal` - The value for subOptimal
    Returns:
      `this` builder for use in a chained invocation

  - ### setTimedOut

    public final VulkanSwapChainImageAcquisition.Builder setTimedOut(boolean timedOut)
    Initializes the value for the `timedOut` attribute.
    Parameters:
      `timedOut` - The value for timedOut
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public VulkanSwapChainImageAcquisition build()
    Builds a new `VulkanSwapChainImageAcquisition`.
    Returns:
      An immutable instance of VulkanSwapChainImageAcquisition
    Throws:
      `IllegalStateException` - if any required attributes are missing