# Class VulkanImageCreateInfo.Builder

java.lang.Object
com.io7m.jcoronado.api.VulkanImageCreateInfo.Builder

Enclosing class:
  `VulkanImageCreateInfo`

public static final class VulkanImageCreateInfo.Builder extends Object
Builds instances of type `VulkanImageCreateInfo`. 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 VulkanImageCreateInfo.Builder`
  `addAllFlags(Iterable<VulkanImageCreateFlag> elements)`
  Adds elements to `flags` set.
  `final VulkanImageCreateInfo.Builder`
  `addAllQueueFamilyIndices(Iterable<Integer> elements)`
  Adds elements to `queueFamilyIndices` list.
  `final VulkanImageCreateInfo.Builder`
  `addAllSamples(Iterable<VulkanSampleCountFlag> elements)`
  Adds elements to `samples` set.
  `final VulkanImageCreateInfo.Builder`
  `addAllUsage(Iterable<VulkanImageUsageFlag> elements)`
  Adds elements to `usage` set.
  `final VulkanImageCreateInfo.Builder`
  `addFlags(VulkanImageCreateFlag element)`
  Adds one element to `flags` set.
  `final VulkanImageCreateInfo.Builder`
  `addFlags(VulkanImageCreateFlag... elements)`
  Adds elements to `flags` set.
  `final VulkanImageCreateInfo.Builder`
  `addQueueFamilyIndices(int element)`
  Adds one element to `queueFamilyIndices` list.
  `final VulkanImageCreateInfo.Builder`
  `addQueueFamilyIndices(int... elements)`
  Adds elements to `queueFamilyIndices` list.
  `final VulkanImageCreateInfo.Builder`
  `addSamples(VulkanSampleCountFlag element)`
  Adds one element to `samples` set.
  `final VulkanImageCreateInfo.Builder`
  `addSamples(VulkanSampleCountFlag... elements)`
  Adds elements to `samples` set.
  `final VulkanImageCreateInfo.Builder`
  `addUsage(VulkanImageUsageFlag element)`
  Adds one element to `usage` set.
  `final VulkanImageCreateInfo.Builder`
  `addUsage(VulkanImageUsageFlag... elements)`
  Adds elements to `usage` set.
  `VulkanImageCreateInfo`
  `build()`
  Builds a new `VulkanImageCreateInfo`.
  `final VulkanImageCreateInfo.Builder`
  `from(VulkanImageCreateInfoType instance)`
  Fill a builder with attribute values from the provided `VulkanImageCreateInfoType` instance.
  `final VulkanImageCreateInfo.Builder`
  `setArrayLayers(int arrayLayers)`
  Initializes the value for the `arrayLayers` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setExtent(VulkanExtent3D extent)`
  Initializes the value for the `extent` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setFlags(Iterable<VulkanImageCreateFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VulkanImageCreateInfo.Builder`
  `setFormat(VulkanFormat format)`
  Initializes the value for the `format` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setImageType(VulkanImageKind imageType)`
  Initializes the value for the `imageType` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setInitialLayout(VulkanImageLayout initialLayout)`
  Initializes the value for the `initialLayout` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setMipLevels(int mipLevels)`
  Initializes the value for the `mipLevels` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setQueueFamilyIndices(Iterable<Integer> elements)`
  Sets or replaces all elements for `queueFamilyIndices` list.
  `final VulkanImageCreateInfo.Builder`
  `setSamples(Iterable<VulkanSampleCountFlag> elements)`
  Sets or replaces all elements for `samples` set.
  `final VulkanImageCreateInfo.Builder`
  `setSharingMode(VulkanSharingMode sharingMode)`
  Initializes the value for the `sharingMode` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setTiling(VulkanImageTiling tiling)`
  Initializes the value for the `tiling` attribute.
  `final VulkanImageCreateInfo.Builder`
  `setUsage(Iterable<VulkanImageUsageFlag> elements)`
  Sets or replaces all elements for `usage` set.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final VulkanImageCreateInfo.Builder from(VulkanImageCreateInfoType instance)
    Fill a builder with attribute values from the provided `VulkanImageCreateInfoType` 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

  - ### addFlags

    public final VulkanImageCreateInfo.Builder addFlags(VulkanImageCreateFlag element)
    Adds one element to `flags` set.
    Parameters:
      `element` - A flags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addFlags

    public final VulkanImageCreateInfo.Builder addFlags(VulkanImageCreateFlag... elements)
    Adds elements to `flags` set.
    Parameters:
      `elements` - An array of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setFlags

    public final VulkanImageCreateInfo.Builder setFlags(Iterable<VulkanImageCreateFlag> elements)
    Sets or replaces all elements for `flags` set.
    Parameters:
      `elements` - An iterable of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllFlags

    public final VulkanImageCreateInfo.Builder addAllFlags(Iterable<VulkanImageCreateFlag> elements)
    Adds elements to `flags` set.
    Parameters:
      `elements` - An iterable of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageType

    public final VulkanImageCreateInfo.Builder setImageType(VulkanImageKind imageType)
    Initializes the value for the `imageType` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `imageType`.

    Parameters:
      `imageType` - The value for imageType
    Returns:
      `this` builder for use in a chained invocation

  - ### setFormat

    public final VulkanImageCreateInfo.Builder setFormat(VulkanFormat format)
    Initializes the value for the `format` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `format`.

    Parameters:
      `format` - The value for format
    Returns:
      `this` builder for use in a chained invocation

  - ### setExtent

    public final VulkanImageCreateInfo.Builder setExtent(VulkanExtent3D extent)
    Initializes the value for the `extent` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `extent`.

    Parameters:
      `extent` - The value for extent
    Returns:
      `this` builder for use in a chained invocation

  - ### setMipLevels

    public final VulkanImageCreateInfo.Builder setMipLevels(int mipLevels)
    Initializes the value for the `mipLevels` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `mipLevels`.

    Parameters:
      `mipLevels` - The value for mipLevels
    Returns:
      `this` builder for use in a chained invocation

  - ### setArrayLayers

    public final VulkanImageCreateInfo.Builder setArrayLayers(int arrayLayers)
    Initializes the value for the `arrayLayers` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `arrayLayers`.

    Parameters:
      `arrayLayers` - The value for arrayLayers
    Returns:
      `this` builder for use in a chained invocation

  - ### addSamples

    public final VulkanImageCreateInfo.Builder addSamples(VulkanSampleCountFlag element)
    Adds one element to `samples` set.
    Parameters:
      `element` - A samples element
    Returns:
      `this` builder for use in a chained invocation

  - ### addSamples

    public final VulkanImageCreateInfo.Builder addSamples(VulkanSampleCountFlag... elements)
    Adds elements to `samples` set.
    Parameters:
      `elements` - An array of samples elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSamples

    public final VulkanImageCreateInfo.Builder setSamples(Iterable<VulkanSampleCountFlag> elements)
    Sets or replaces all elements for `samples` set.
    Parameters:
      `elements` - An iterable of samples elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllSamples

    public final VulkanImageCreateInfo.Builder addAllSamples(Iterable<VulkanSampleCountFlag> elements)
    Adds elements to `samples` set.
    Parameters:
      `elements` - An iterable of samples elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setTiling

    public final VulkanImageCreateInfo.Builder setTiling(VulkanImageTiling tiling)
    Initializes the value for the `tiling` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `tiling`.

    Parameters:
      `tiling` - The value for tiling
    Returns:
      `this` builder for use in a chained invocation

  - ### addUsage

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

  - ### addUsage

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

  - ### setUsage

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

  - ### addAllUsage

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

  - ### setSharingMode

    public final VulkanImageCreateInfo.Builder setSharingMode(VulkanSharingMode sharingMode)
    Initializes the value for the `sharingMode` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `sharingMode`.

    Parameters:
      `sharingMode` - The value for sharingMode
    Returns:
      `this` builder for use in a chained invocation

  - ### addQueueFamilyIndices

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

  - ### addQueueFamilyIndices

    public final VulkanImageCreateInfo.Builder addQueueFamilyIndices(int... 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 VulkanImageCreateInfo.Builder setQueueFamilyIndices(Iterable<Integer> 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 VulkanImageCreateInfo.Builder addAllQueueFamilyIndices(Iterable<Integer> elements)
    Adds elements to `queueFamilyIndices` list.
    Parameters:
      `elements` - An iterable of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setInitialLayout

    public final VulkanImageCreateInfo.Builder setInitialLayout(VulkanImageLayout initialLayout)
    Initializes the value for the `initialLayout` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `initialLayout`.

    Parameters:
      `initialLayout` - The value for initialLayout
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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