# Class VulkanWriteDescriptorSet

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

All Implemented Interfaces:
  `VulkanWriteDescriptorSetType`

public final class VulkanWriteDescriptorSet extends Object implements VulkanWriteDescriptorSetType

See Also:
  - "VkWriteDescriptorSet"

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VulkanWriteDescriptorSet.Builder`
  Builds instances of type `VulkanWriteDescriptorSet`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<VulkanDescriptorBufferInfo>`
  `bufferInfos()`
  `static VulkanWriteDescriptorSet.Builder`
  `builder()`
  Creates a builder for `VulkanWriteDescriptorSet`.
  `static VulkanWriteDescriptorSet`
  `copyOf(VulkanWriteDescriptorSetType instance)`
  Creates an immutable copy of a `VulkanWriteDescriptorSetType` value.
  `int`
  `descriptorCount()`
  `VulkanDescriptorType`
  `descriptorType()`
  `int`
  `destinationArrayElement()`
  `int`
  `destinationBinding()`
  `VulkanDescriptorSetType`
  `destinationSet()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanWriteDescriptorSet` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `destinationSet`, `destinationBinding`, `destinationArrayElement`, `descriptorCount`, `descriptorType`, `imageInfos`, `bufferInfos`, `texelBufferViews`.
  `List<VulkanDescriptorImageInfo>`
  `imageInfos()`
  `List<VulkanBufferViewType>`
  `texelBufferViews()`
  `String`
  `toString()`
  Prints the immutable value `VulkanWriteDescriptorSet` with attribute values.
  `final VulkanWriteDescriptorSet`
  `withBufferInfos(VulkanDescriptorBufferInfo... elements)`
  Copy the current immutable object with elements that replace the content of `bufferInfos`.
  `final VulkanWriteDescriptorSet`
  `withBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements)`
  Copy the current immutable object with elements that replace the content of `bufferInfos`.
  `final VulkanWriteDescriptorSet`
  `withDescriptorCount(int value)`
  Copy the current immutable object by setting a value for the `descriptorCount` attribute.
  `final VulkanWriteDescriptorSet`
  `withDescriptorType(VulkanDescriptorType value)`
  Copy the current immutable object by setting a value for the `descriptorType` attribute.
  `final VulkanWriteDescriptorSet`
  `withDestinationArrayElement(int value)`
  Copy the current immutable object by setting a value for the `destinationArrayElement` attribute.
  `final VulkanWriteDescriptorSet`
  `withDestinationBinding(int value)`
  Copy the current immutable object by setting a value for the `destinationBinding` attribute.
  `final VulkanWriteDescriptorSet`
  `withDestinationSet(VulkanDescriptorSetType value)`
  Copy the current immutable object by setting a value for the `destinationSet` attribute.
  `final VulkanWriteDescriptorSet`
  `withImageInfos(VulkanDescriptorImageInfo... elements)`
  Copy the current immutable object with elements that replace the content of `imageInfos`.
  `final VulkanWriteDescriptorSet`
  `withImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements)`
  Copy the current immutable object with elements that replace the content of `imageInfos`.
  `final VulkanWriteDescriptorSet`
  `withTexelBufferViews(VulkanBufferViewType... elements)`
  Copy the current immutable object with elements that replace the content of `texelBufferViews`.
  `final VulkanWriteDescriptorSet`
  `withTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements)`
  Copy the current immutable object with elements that replace the content of `texelBufferViews`.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### destinationSet

    public VulkanDescriptorSetType destinationSet()
    Specified by:
      `destinationSet` in interface `VulkanWriteDescriptorSetType`
    Returns:
      The destination descriptor set to update.

  - ### destinationBinding

    public int destinationBinding()
    Specified by:
      `destinationBinding` in interface `VulkanWriteDescriptorSetType`
    Returns:
      The descriptor binding within that set.

  - ### destinationArrayElement

    public int destinationArrayElement()
    Specified by:
      `destinationArrayElement` in interface `VulkanWriteDescriptorSetType`
    Returns:
      The starting element in that array. If the descriptor binding identified by destinationSet and destinationBinding has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT then destinationArrayElement specifies the starting byte offset within the binding.

  - ### descriptorCount

    public int descriptorCount()
    Specified by:
      `descriptorCount` in interface `VulkanWriteDescriptorSetType`
    Returns:
      The number of descriptors to update (the number of elements in imageInfos, bufferInfos, or texelBufferViews , or a value matching the dataSize member of an instance of VkWriteDescriptorSetInlineUniformBlockEXT in the pNext chain , or a value matching the accelerationStructureCount of an instance of VkWriteDescriptorSetAccelerationStructureNV in the pNext chain ). If the descriptor binding identified by destinationSet and destinationBinding has a descriptor type of VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT then descriptorCount specifies the number of bytes to update.

  - ### descriptorType

    public VulkanDescriptorType descriptorType()
    Specified by:
      `descriptorType` in interface `VulkanWriteDescriptorSetType`
    Returns:
      A VkDescriptorType specifying the type of each descriptor in imageInfos, bufferInfos, or texelBufferViews, as described below. It must be the same type as that specified in VkDescriptorSetLayoutBinding for destinationSet at destinationBinding. The type of the descriptor also controls which array the descriptors are taken from.

  - ### imageInfos

    public List<VulkanDescriptorImageInfo> imageInfos()
    Specified by:
      `imageInfos` in interface `VulkanWriteDescriptorSetType`
    Returns:
      An array of VulkanDescriptorImageInfo structures

  - ### bufferInfos

    public List<VulkanDescriptorBufferInfo> bufferInfos()
    Specified by:
      `bufferInfos` in interface `VulkanWriteDescriptorSetType`
    Returns:
      An array of VulkanDescriptorBufferInfo structures

  - ### texelBufferViews

    public List<VulkanBufferViewType> texelBufferViews()
    Specified by:
      `texelBufferViews` in interface `VulkanWriteDescriptorSetType`
    Returns:
      An array of VulkanBufferViewType handles

  - ### withDestinationSet

    public final VulkanWriteDescriptorSet withDestinationSet(VulkanDescriptorSetType value)
    Copy the current immutable object by setting a value for the `destinationSet` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for destinationSet
    Returns:
      A modified copy or the `this` object

  - ### withDestinationBinding

    public final VulkanWriteDescriptorSet withDestinationBinding(int value)
    Copy the current immutable object by setting a value for the `destinationBinding` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for destinationBinding
    Returns:
      A modified copy or the `this` object

  - ### withDestinationArrayElement

    public final VulkanWriteDescriptorSet withDestinationArrayElement(int value)
    Copy the current immutable object by setting a value for the `destinationArrayElement` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for destinationArrayElement
    Returns:
      A modified copy or the `this` object

  - ### withDescriptorCount

    public final VulkanWriteDescriptorSet withDescriptorCount(int value)
    Copy the current immutable object by setting a value for the `descriptorCount` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for descriptorCount
    Returns:
      A modified copy or the `this` object

  - ### withDescriptorType

    public final VulkanWriteDescriptorSet withDescriptorType(VulkanDescriptorType value)
    Copy the current immutable object by setting a value for the `descriptorType` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for descriptorType
    Returns:
      A modified copy or the `this` object

  - ### withImageInfos

    public final VulkanWriteDescriptorSet withImageInfos(VulkanDescriptorImageInfo... elements)
    Copy the current immutable object with elements that replace the content of `imageInfos`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withImageInfos

    public final VulkanWriteDescriptorSet withImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements)
    Copy the current immutable object with elements that replace the content of `imageInfos`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of imageInfos elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withBufferInfos

    public final VulkanWriteDescriptorSet withBufferInfos(VulkanDescriptorBufferInfo... elements)
    Copy the current immutable object with elements that replace the content of `bufferInfos`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withBufferInfos

    public final VulkanWriteDescriptorSet withBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements)
    Copy the current immutable object with elements that replace the content of `bufferInfos`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of bufferInfos elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withTexelBufferViews

    public final VulkanWriteDescriptorSet withTexelBufferViews(VulkanBufferViewType... elements)
    Copy the current immutable object with elements that replace the content of `texelBufferViews`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withTexelBufferViews

    public final VulkanWriteDescriptorSet withTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements)
    Copy the current immutable object with elements that replace the content of `texelBufferViews`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of texelBufferViews elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanWriteDescriptorSet` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `destinationSet`, `destinationBinding`, `destinationArrayElement`, `descriptorCount`, `descriptorType`, `imageInfos`, `bufferInfos`, `texelBufferViews`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `VulkanWriteDescriptorSet` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static VulkanWriteDescriptorSet copyOf(VulkanWriteDescriptorSetType instance)
    Creates an immutable copy of a `VulkanWriteDescriptorSetType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable VulkanWriteDescriptorSet instance

  - ### builder

    public static VulkanWriteDescriptorSet.Builder builder()
    Creates a builder for `VulkanWriteDescriptorSet`.

        VulkanWriteDescriptorSet.builder()
           .setDestinationSet(com.io7m.jcoronado.api.VulkanDescriptorSetType) // required destinationSet
           .setDestinationBinding(int) // required destinationBinding
           .setDestinationArrayElement(int) // optional destinationArrayElement
           .setDescriptorCount(int) // required descriptorCount
           .setDescriptorType(com.io7m.jcoronado.api.VulkanDescriptorType) // required descriptorType
           .addImageInfos|addAllImageInfos(VulkanDescriptorImageInfo) // imageInfos elements
           .addBufferInfos|addAllBufferInfos(VulkanDescriptorBufferInfo) // bufferInfos elements
           .addTexelBufferViews|addAllTexelBufferViews(com.io7m.jcoronado.api.VulkanBufferViewType) // texelBufferViews elements
           .build();

    Returns:
      A new VulkanWriteDescriptorSet builder