# Class VulkanSwapChainCreateInfo.Builder

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

Enclosing class:
  `VulkanSwapChainCreateInfo`

public static final class VulkanSwapChainCreateInfo.Builder extends Object
Builds instances of type `VulkanSwapChainCreateInfo`. 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
  `final VulkanSwapChainCreateInfo.Builder`
  `addAllCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements)`
  Adds elements to `compositeAlpha` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addAllImageUsageFlags(Iterable<VulkanImageUsageFlag> elements)`
  Adds elements to `imageUsageFlags` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addAllPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements)`
  Adds elements to `preTransform` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)`
  Adds elements to `queueFamilyIndices` list.
  `final VulkanSwapChainCreateInfo.Builder`
  `addCompositeAlpha(VulkanCompositeAlphaFlagKHR element)`
  Adds one element to `compositeAlpha` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements)`
  Adds elements to `compositeAlpha` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addImageUsageFlags(VulkanImageUsageFlag element)`
  Adds one element to `imageUsageFlags` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addImageUsageFlags(VulkanImageUsageFlag... elements)`
  Adds elements to `imageUsageFlags` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addPreTransform(VulkanSurfaceTransformFlagKHR element)`
  Adds one element to `preTransform` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addPreTransform(VulkanSurfaceTransformFlagKHR... elements)`
  Adds elements to `preTransform` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `addQueueFamilyIndices(VulkanQueueFamilyIndex element)`
  Adds one element to `queueFamilyIndices` list.
  `final VulkanSwapChainCreateInfo.Builder`
  `addQueueFamilyIndices(VulkanQueueFamilyIndex... elements)`
  Adds elements to `queueFamilyIndices` list.
  `VulkanSwapChainCreateInfo`
  `build()`
  Builds a new `VulkanSwapChainCreateInfo`.
  `final VulkanSwapChainCreateInfo.Builder`
  `from(VulkanSwapChainCreateInfoType instance)`
  Fill a builder with attribute values from the provided `VulkanSwapChainCreateInfoType` instance.
  `final VulkanSwapChainCreateInfo.Builder`
  `setClipped(boolean clipped)`
  Initializes the value for the `clipped` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements)`
  Sets or replaces all elements for `compositeAlpha` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `setImageArrayLayers(int imageArrayLayers)`
  Initializes the value for the `imageArrayLayers` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setImageColorSpace(VulkanColorSpaceKHR imageColorSpace)`
  Initializes the value for the `imageColorSpace` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setImageExtent(VulkanExtent2D imageExtent)`
  Initializes the value for the `imageExtent` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setImageFormat(VulkanFormat imageFormat)`
  Initializes the value for the `imageFormat` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setImageSharingMode(VulkanSharingMode imageSharingMode)`
  Initializes the value for the `imageSharingMode` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setImageUsageFlags(Iterable<VulkanImageUsageFlag> elements)`
  Sets or replaces all elements for `imageUsageFlags` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `setMinimumImageCount(int minimumImageCount)`
  Initializes the value for the `minimumImageCount` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setOldSwapChain(VulkanExtKHRSwapChainType.VulkanKHRSwapChainType oldSwapChain)`
  Initializes the optional value `oldSwapChain` to oldSwapChain.
  `final VulkanSwapChainCreateInfo.Builder`
  `setOldSwapChain(Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain)`
  Initializes the optional value `oldSwapChain` to oldSwapChain.
  `final VulkanSwapChainCreateInfo.Builder`
  `setPresentMode(VulkanPresentModeKHR presentMode)`
  Initializes the value for the `presentMode` attribute.
  `final VulkanSwapChainCreateInfo.Builder`
  `setPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements)`
  Sets or replaces all elements for `preTransform` set.
  `final VulkanSwapChainCreateInfo.Builder`
  `setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)`
  Sets or replaces all elements for `queueFamilyIndices` list.
  `final VulkanSwapChainCreateInfo.Builder`
  `setSurface(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface)`
  Initializes the value for the `surface` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

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

  - ### setSurface

    public final VulkanSwapChainCreateInfo.Builder setSurface(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface)
    Initializes the value for the `surface` attribute.
    Parameters:
      `surface` - The value for surface
    Returns:
      `this` builder for use in a chained invocation

  - ### setMinimumImageCount

    public final VulkanSwapChainCreateInfo.Builder setMinimumImageCount(int minimumImageCount)
    Initializes the value for the `minimumImageCount` attribute.
    Parameters:
      `minimumImageCount` - The value for minimumImageCount
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageFormat

    public final VulkanSwapChainCreateInfo.Builder setImageFormat(VulkanFormat imageFormat)
    Initializes the value for the `imageFormat` attribute.
    Parameters:
      `imageFormat` - The value for imageFormat
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageColorSpace

    public final VulkanSwapChainCreateInfo.Builder setImageColorSpace(VulkanColorSpaceKHR imageColorSpace)
    Initializes the value for the `imageColorSpace` attribute.
    Parameters:
      `imageColorSpace` - The value for imageColorSpace
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageExtent

    public final VulkanSwapChainCreateInfo.Builder setImageExtent(VulkanExtent2D imageExtent)
    Initializes the value for the `imageExtent` attribute.
    Parameters:
      `imageExtent` - The value for imageExtent
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageArrayLayers

    public final VulkanSwapChainCreateInfo.Builder setImageArrayLayers(int imageArrayLayers)
    Initializes the value for the `imageArrayLayers` attribute.
    Parameters:
      `imageArrayLayers` - The value for imageArrayLayers
    Returns:
      `this` builder for use in a chained invocation

  - ### addImageUsageFlags

    public final VulkanSwapChainCreateInfo.Builder addImageUsageFlags(VulkanImageUsageFlag element)
    Adds one element to `imageUsageFlags` set.
    Parameters:
      `element` - A imageUsageFlags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addImageUsageFlags

    public final VulkanSwapChainCreateInfo.Builder addImageUsageFlags(VulkanImageUsageFlag... elements)
    Adds elements to `imageUsageFlags` set.
    Parameters:
      `elements` - An array of imageUsageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageUsageFlags

    public final VulkanSwapChainCreateInfo.Builder setImageUsageFlags(Iterable<VulkanImageUsageFlag> elements)
    Sets or replaces all elements for `imageUsageFlags` set.
    Parameters:
      `elements` - An iterable of imageUsageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllImageUsageFlags

    public final VulkanSwapChainCreateInfo.Builder addAllImageUsageFlags(Iterable<VulkanImageUsageFlag> elements)
    Adds elements to `imageUsageFlags` set.
    Parameters:
      `elements` - An iterable of imageUsageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageSharingMode

    public final VulkanSwapChainCreateInfo.Builder setImageSharingMode(VulkanSharingMode imageSharingMode)
    Initializes the value for the `imageSharingMode` attribute.
    Parameters:
      `imageSharingMode` - The value for imageSharingMode
    Returns:
      `this` builder for use in a chained invocation

  - ### addQueueFamilyIndices

    public final VulkanSwapChainCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex element)
    Adds one element to `queueFamilyIndices` list.
    Parameters:
      `element` - A queueFamilyIndices element
    Returns:
      `this` builder for use in a chained invocation

  - ### addQueueFamilyIndices

    public final VulkanSwapChainCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex... elements)
    Adds elements to `queueFamilyIndices` list.
    Parameters:
      `elements` - An array of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setQueueFamilyIndices

    public final VulkanSwapChainCreateInfo.Builder setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)
    Sets or replaces all elements for `queueFamilyIndices` list.
    Parameters:
      `elements` - An iterable of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllQueueFamilyIndices

    public final VulkanSwapChainCreateInfo.Builder addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)
    Adds elements to `queueFamilyIndices` list.
    Parameters:
      `elements` - An iterable of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addPreTransform

    public final VulkanSwapChainCreateInfo.Builder addPreTransform(VulkanSurfaceTransformFlagKHR element)
    Adds one element to `preTransform` set.
    Parameters:
      `element` - A preTransform element
    Returns:
      `this` builder for use in a chained invocation

  - ### addPreTransform

    public final VulkanSwapChainCreateInfo.Builder addPreTransform(VulkanSurfaceTransformFlagKHR... elements)
    Adds elements to `preTransform` set.
    Parameters:
      `elements` - An array of preTransform elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setPreTransform

    public final VulkanSwapChainCreateInfo.Builder setPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements)
    Sets or replaces all elements for `preTransform` set.
    Parameters:
      `elements` - An iterable of preTransform elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllPreTransform

    public final VulkanSwapChainCreateInfo.Builder addAllPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements)
    Adds elements to `preTransform` set.
    Parameters:
      `elements` - An iterable of preTransform elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addCompositeAlpha

    public final VulkanSwapChainCreateInfo.Builder addCompositeAlpha(VulkanCompositeAlphaFlagKHR element)
    Adds one element to `compositeAlpha` set.
    Parameters:
      `element` - A compositeAlpha element
    Returns:
      `this` builder for use in a chained invocation

  - ### addCompositeAlpha

    public final VulkanSwapChainCreateInfo.Builder addCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements)
    Adds elements to `compositeAlpha` set.
    Parameters:
      `elements` - An array of compositeAlpha elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setCompositeAlpha

    public final VulkanSwapChainCreateInfo.Builder setCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements)
    Sets or replaces all elements for `compositeAlpha` set.
    Parameters:
      `elements` - An iterable of compositeAlpha elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllCompositeAlpha

    public final VulkanSwapChainCreateInfo.Builder addAllCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements)
    Adds elements to `compositeAlpha` set.
    Parameters:
      `elements` - An iterable of compositeAlpha elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setPresentMode

    public final VulkanSwapChainCreateInfo.Builder setPresentMode(VulkanPresentModeKHR presentMode)
    Initializes the value for the `presentMode` attribute.
    Parameters:
      `presentMode` - The value for presentMode
    Returns:
      `this` builder for use in a chained invocation

  - ### setClipped

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

  - ### setOldSwapChain

    public final VulkanSwapChainCreateInfo.Builder setOldSwapChain(VulkanExtKHRSwapChainType.VulkanKHRSwapChainType oldSwapChain)
    Initializes the optional value `oldSwapChain` to oldSwapChain.
    Parameters:
      `oldSwapChain` - The value for oldSwapChain
    Returns:
      `this` builder for chained invocation

  - ### setOldSwapChain

    public final VulkanSwapChainCreateInfo.Builder setOldSwapChain(Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain)
    Initializes the optional value `oldSwapChain` to oldSwapChain.
    Parameters:
      `oldSwapChain` - The value for oldSwapChain
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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