# Class VulkanDescriptorSetLayoutBinding.Builder

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

Enclosing class:
  `VulkanDescriptorSetLayoutBinding`

public static final class VulkanDescriptorSetLayoutBinding.Builder extends Object
Builds instances of type `VulkanDescriptorSetLayoutBinding`. 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 VulkanDescriptorSetLayoutBinding.Builder`
  `addAllImmutableSamplers(Iterable<? extends VulkanSamplerType> elements)`
  Adds elements to `immutableSamplers` list.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `addAllStageFlags(Iterable<VulkanShaderStageFlag> elements)`
  Adds elements to `stageFlags` set.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `addImmutableSamplers(VulkanSamplerType element)`
  Adds one element to `immutableSamplers` list.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `addImmutableSamplers(VulkanSamplerType... elements)`
  Adds elements to `immutableSamplers` list.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `addStageFlags(VulkanShaderStageFlag element)`
  Adds one element to `stageFlags` set.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `addStageFlags(VulkanShaderStageFlag... elements)`
  Adds elements to `stageFlags` set.
  `VulkanDescriptorSetLayoutBinding`
  `build()`
  Builds a new `VulkanDescriptorSetLayoutBinding`.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `from(VulkanDescriptorSetLayoutBindingType instance)`
  Fill a builder with attribute values from the provided `VulkanDescriptorSetLayoutBindingType` instance.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `setBinding(int binding)`
  Initializes the value for the `binding` attribute.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `setDescriptorCount(int descriptorCount)`
  Initializes the value for the `descriptorCount` attribute.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `setDescriptorType(VulkanDescriptorType descriptorType)`
  Initializes the value for the `descriptorType` attribute.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `setImmutableSamplers(Iterable<? extends VulkanSamplerType> elements)`
  Sets or replaces all elements for `immutableSamplers` list.
  `final VulkanDescriptorSetLayoutBinding.Builder`
  `setStageFlags(Iterable<VulkanShaderStageFlag> elements)`
  Sets or replaces all elements for `stageFlags` set.

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

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

- ## Method Details

  - ### from

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

  - ### setBinding

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

  - ### setDescriptorType

    public final VulkanDescriptorSetLayoutBinding.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

  - ### setDescriptorCount

    public final VulkanDescriptorSetLayoutBinding.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

  - ### addStageFlags

    public final VulkanDescriptorSetLayoutBinding.Builder addStageFlags(VulkanShaderStageFlag element)
    Adds one element to `stageFlags` set.
    Parameters:
      `element` - A stageFlags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addStageFlags

    public final VulkanDescriptorSetLayoutBinding.Builder addStageFlags(VulkanShaderStageFlag... elements)
    Adds elements to `stageFlags` set.
    Parameters:
      `elements` - An array of stageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setStageFlags

    public final VulkanDescriptorSetLayoutBinding.Builder setStageFlags(Iterable<VulkanShaderStageFlag> elements)
    Sets or replaces all elements for `stageFlags` set.
    Parameters:
      `elements` - An iterable of stageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllStageFlags

    public final VulkanDescriptorSetLayoutBinding.Builder addAllStageFlags(Iterable<VulkanShaderStageFlag> elements)
    Adds elements to `stageFlags` set.
    Parameters:
      `elements` - An iterable of stageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addImmutableSamplers

    public final VulkanDescriptorSetLayoutBinding.Builder addImmutableSamplers(VulkanSamplerType element)
    Adds one element to `immutableSamplers` list.
    Parameters:
      `element` - A immutableSamplers element
    Returns:
      `this` builder for use in a chained invocation

  - ### addImmutableSamplers

    public final VulkanDescriptorSetLayoutBinding.Builder addImmutableSamplers(VulkanSamplerType... elements)
    Adds elements to `immutableSamplers` list.
    Parameters:
      `elements` - An array of immutableSamplers elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setImmutableSamplers

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

  - ### addAllImmutableSamplers

    public final VulkanDescriptorSetLayoutBinding.Builder addAllImmutableSamplers(Iterable<? extends VulkanSamplerType> elements)
    Adds elements to `immutableSamplers` list.
    Parameters:
      `elements` - An iterable of immutableSamplers elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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