# Class VulkanWriteDescriptorSet.Builder

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

Enclosing class:
  `VulkanWriteDescriptorSet`

public static final class VulkanWriteDescriptorSet.Builder extends Object
Builds instances of type `VulkanWriteDescriptorSet`. 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 VulkanWriteDescriptorSet.Builder`
  `addAllBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements)`
  Adds elements to `bufferInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addAllImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements)`
  Adds elements to `imageInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addAllTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements)`
  Adds elements to `texelBufferViews` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addBufferInfos(VulkanDescriptorBufferInfo element)`
  Adds one element to `bufferInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addBufferInfos(VulkanDescriptorBufferInfo... elements)`
  Adds elements to `bufferInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addImageInfos(VulkanDescriptorImageInfo element)`
  Adds one element to `imageInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addImageInfos(VulkanDescriptorImageInfo... elements)`
  Adds elements to `imageInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addTexelBufferViews(VulkanBufferViewType element)`
  Adds one element to `texelBufferViews` list.
  `final VulkanWriteDescriptorSet.Builder`
  `addTexelBufferViews(VulkanBufferViewType... elements)`
  Adds elements to `texelBufferViews` list.
  `VulkanWriteDescriptorSet`
  `build()`
  Builds a new `VulkanWriteDescriptorSet`.
  `final VulkanWriteDescriptorSet.Builder`
  `from(VulkanWriteDescriptorSetType instance)`
  Fill a builder with attribute values from the provided `VulkanWriteDescriptorSetType` instance.
  `final VulkanWriteDescriptorSet.Builder`
  `setBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements)`
  Sets or replaces all elements for `bufferInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `setDescriptorCount(int descriptorCount)`
  Initializes the value for the `descriptorCount` attribute.
  `final VulkanWriteDescriptorSet.Builder`
  `setDescriptorType(VulkanDescriptorType descriptorType)`
  Initializes the value for the `descriptorType` attribute.
  `final VulkanWriteDescriptorSet.Builder`
  `setDestinationArrayElement(int destinationArrayElement)`
  Initializes the value for the `destinationArrayElement` attribute.
  `final VulkanWriteDescriptorSet.Builder`
  `setDestinationBinding(int destinationBinding)`
  Initializes the value for the `destinationBinding` attribute.
  `final VulkanWriteDescriptorSet.Builder`
  `setDestinationSet(VulkanDescriptorSetType destinationSet)`
  Initializes the value for the `destinationSet` attribute.
  `final VulkanWriteDescriptorSet.Builder`
  `setImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements)`
  Sets or replaces all elements for `imageInfos` list.
  `final VulkanWriteDescriptorSet.Builder`
  `setTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements)`
  Sets or replaces all elements for `texelBufferViews` list.

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

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

- ## Method Details

  - ### from

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

  - ### setDestinationSet

    public final VulkanWriteDescriptorSet.Builder setDestinationSet(VulkanDescriptorSetType destinationSet)
    Initializes the value for the `destinationSet` attribute.
    Parameters:
      `destinationSet` - The value for destinationSet
    Returns:
      `this` builder for use in a chained invocation

  - ### setDestinationBinding

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

  - ### setDestinationArrayElement

    public final VulkanWriteDescriptorSet.Builder setDestinationArrayElement(int destinationArrayElement)
    Initializes the value for the `destinationArrayElement` attribute.

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

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

  - ### setDescriptorCount

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

  - ### setDescriptorType

    public final VulkanWriteDescriptorSet.Builder setDescriptorType(VulkanDescriptorType descriptorType)
    Initializes the value for the `descriptorType` attribute.
    Parameters:
      `descriptorType` - The value for descriptorType
    Returns:
      `this` builder for use in a chained invocation

  - ### addImageInfos

    public final VulkanWriteDescriptorSet.Builder addImageInfos(VulkanDescriptorImageInfo element)
    Adds one element to `imageInfos` list.
    Parameters:
      `element` - A imageInfos element
    Returns:
      `this` builder for use in a chained invocation

  - ### addImageInfos

    public final VulkanWriteDescriptorSet.Builder addImageInfos(VulkanDescriptorImageInfo... elements)
    Adds elements to `imageInfos` list.
    Parameters:
      `elements` - An array of imageInfos elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setImageInfos

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

  - ### addAllImageInfos

    public final VulkanWriteDescriptorSet.Builder addAllImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements)
    Adds elements to `imageInfos` list.
    Parameters:
      `elements` - An iterable of imageInfos elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addBufferInfos

    public final VulkanWriteDescriptorSet.Builder addBufferInfos(VulkanDescriptorBufferInfo element)
    Adds one element to `bufferInfos` list.
    Parameters:
      `element` - A bufferInfos element
    Returns:
      `this` builder for use in a chained invocation

  - ### addBufferInfos

    public final VulkanWriteDescriptorSet.Builder addBufferInfos(VulkanDescriptorBufferInfo... elements)
    Adds elements to `bufferInfos` list.
    Parameters:
      `elements` - An array of bufferInfos elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setBufferInfos

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

  - ### addAllBufferInfos

    public final VulkanWriteDescriptorSet.Builder addAllBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements)
    Adds elements to `bufferInfos` list.
    Parameters:
      `elements` - An iterable of bufferInfos elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addTexelBufferViews

    public final VulkanWriteDescriptorSet.Builder addTexelBufferViews(VulkanBufferViewType element)
    Adds one element to `texelBufferViews` list.
    Parameters:
      `element` - A texelBufferViews element
    Returns:
      `this` builder for use in a chained invocation

  - ### addTexelBufferViews

    public final VulkanWriteDescriptorSet.Builder addTexelBufferViews(VulkanBufferViewType... elements)
    Adds elements to `texelBufferViews` list.
    Parameters:
      `elements` - An array of texelBufferViews elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setTexelBufferViews

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

  - ### addAllTexelBufferViews

    public final VulkanWriteDescriptorSet.Builder addAllTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements)
    Adds elements to `texelBufferViews` list.
    Parameters:
      `elements` - An iterable of texelBufferViews elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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