# Class VulkanSubpassDescription.Builder

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

Enclosing class:
  `VulkanSubpassDescription`

public static final class VulkanSubpassDescription.Builder extends Object
Builds instances of type `VulkanSubpassDescription`. 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 VulkanSubpassDescription.Builder`
  `addAllColorAttachments(Iterable<? extends VulkanAttachmentReference> elements)`
  Adds elements to `colorAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addAllFlags(Iterable<VulkanSubpassDescriptionFlag> elements)`
  Adds elements to `flags` set.
  `final VulkanSubpassDescription.Builder`
  `addAllInputAttachments(Iterable<? extends VulkanAttachmentReference> elements)`
  Adds elements to `inputAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addAllPreserveAttachments(Iterable<Integer> elements)`
  Adds elements to `preserveAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addAllResolveAttachments(Iterable<? extends VulkanAttachmentReference> elements)`
  Adds elements to `resolveAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addColorAttachments(VulkanAttachmentReference element)`
  Adds one element to `colorAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addColorAttachments(VulkanAttachmentReference... elements)`
  Adds elements to `colorAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addFlags(VulkanSubpassDescriptionFlag element)`
  Adds one element to `flags` set.
  `final VulkanSubpassDescription.Builder`
  `addFlags(VulkanSubpassDescriptionFlag... elements)`
  Adds elements to `flags` set.
  `final VulkanSubpassDescription.Builder`
  `addInputAttachments(VulkanAttachmentReference element)`
  Adds one element to `inputAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addInputAttachments(VulkanAttachmentReference... elements)`
  Adds elements to `inputAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addPreserveAttachments(int element)`
  Adds one element to `preserveAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addPreserveAttachments(int... elements)`
  Adds elements to `preserveAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addResolveAttachments(VulkanAttachmentReference element)`
  Adds one element to `resolveAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `addResolveAttachments(VulkanAttachmentReference... elements)`
  Adds elements to `resolveAttachments` list.
  `VulkanSubpassDescription`
  `build()`
  Builds a new `VulkanSubpassDescription`.
  `final VulkanSubpassDescription.Builder`
  `from(VulkanSubpassDescriptionType instance)`
  Fill a builder with attribute values from the provided `VulkanSubpassDescriptionType` instance.
  `final VulkanSubpassDescription.Builder`
  `setColorAttachments(Iterable<? extends VulkanAttachmentReference> elements)`
  Sets or replaces all elements for `colorAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `setDepthStencilAttachment(VulkanAttachmentReference depthStencilAttachment)`
  Initializes the optional value `depthStencilAttachment` to depthStencilAttachment.
  `final VulkanSubpassDescription.Builder`
  `setDepthStencilAttachment(Optional<? extends VulkanAttachmentReference> depthStencilAttachment)`
  Initializes the optional value `depthStencilAttachment` to depthStencilAttachment.
  `final VulkanSubpassDescription.Builder`
  `setFlags(Iterable<VulkanSubpassDescriptionFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VulkanSubpassDescription.Builder`
  `setInputAttachments(Iterable<? extends VulkanAttachmentReference> elements)`
  Sets or replaces all elements for `inputAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `setPipelineBindPoint(VulkanPipelineBindPoint pipelineBindPoint)`
  Initializes the value for the `pipelineBindPoint` attribute.
  `final VulkanSubpassDescription.Builder`
  `setPreserveAttachments(Iterable<Integer> elements)`
  Sets or replaces all elements for `preserveAttachments` list.
  `final VulkanSubpassDescription.Builder`
  `setResolveAttachments(Iterable<? extends VulkanAttachmentReference> elements)`
  Sets or replaces all elements for `resolveAttachments` list.

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

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

- ## Method Details

  - ### from

    public final VulkanSubpassDescription.Builder from(VulkanSubpassDescriptionType instance)
    Fill a builder with attribute values from the provided `VulkanSubpassDescriptionType` 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 VulkanSubpassDescription.Builder addFlags(VulkanSubpassDescriptionFlag element)
    Adds one element to `flags` set.
    Parameters:
      `element` - A flags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addFlags

    public final VulkanSubpassDescription.Builder addFlags(VulkanSubpassDescriptionFlag... 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 VulkanSubpassDescription.Builder setFlags(Iterable<VulkanSubpassDescriptionFlag> 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 VulkanSubpassDescription.Builder addAllFlags(Iterable<VulkanSubpassDescriptionFlag> elements)
    Adds elements to `flags` set.
    Parameters:
      `elements` - An iterable of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setPipelineBindPoint

    public final VulkanSubpassDescription.Builder setPipelineBindPoint(VulkanPipelineBindPoint pipelineBindPoint)
    Initializes the value for the `pipelineBindPoint` attribute.
    Parameters:
      `pipelineBindPoint` - The value for pipelineBindPoint
    Returns:
      `this` builder for use in a chained invocation

  - ### addInputAttachments

    public final VulkanSubpassDescription.Builder addInputAttachments(VulkanAttachmentReference element)
    Adds one element to `inputAttachments` list.
    Parameters:
      `element` - A inputAttachments element
    Returns:
      `this` builder for use in a chained invocation

  - ### addInputAttachments

    public final VulkanSubpassDescription.Builder addInputAttachments(VulkanAttachmentReference... elements)
    Adds elements to `inputAttachments` list.
    Parameters:
      `elements` - An array of inputAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setInputAttachments

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

  - ### addAllInputAttachments

    public final VulkanSubpassDescription.Builder addAllInputAttachments(Iterable<? extends VulkanAttachmentReference> elements)
    Adds elements to `inputAttachments` list.
    Parameters:
      `elements` - An iterable of inputAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addColorAttachments

    public final VulkanSubpassDescription.Builder addColorAttachments(VulkanAttachmentReference element)
    Adds one element to `colorAttachments` list.
    Parameters:
      `element` - A colorAttachments element
    Returns:
      `this` builder for use in a chained invocation

  - ### addColorAttachments

    public final VulkanSubpassDescription.Builder addColorAttachments(VulkanAttachmentReference... elements)
    Adds elements to `colorAttachments` list.
    Parameters:
      `elements` - An array of colorAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setColorAttachments

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

  - ### addAllColorAttachments

    public final VulkanSubpassDescription.Builder addAllColorAttachments(Iterable<? extends VulkanAttachmentReference> elements)
    Adds elements to `colorAttachments` list.
    Parameters:
      `elements` - An iterable of colorAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addResolveAttachments

    public final VulkanSubpassDescription.Builder addResolveAttachments(VulkanAttachmentReference element)
    Adds one element to `resolveAttachments` list.
    Parameters:
      `element` - A resolveAttachments element
    Returns:
      `this` builder for use in a chained invocation

  - ### addResolveAttachments

    public final VulkanSubpassDescription.Builder addResolveAttachments(VulkanAttachmentReference... elements)
    Adds elements to `resolveAttachments` list.
    Parameters:
      `elements` - An array of resolveAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setResolveAttachments

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

  - ### addAllResolveAttachments

    public final VulkanSubpassDescription.Builder addAllResolveAttachments(Iterable<? extends VulkanAttachmentReference> elements)
    Adds elements to `resolveAttachments` list.
    Parameters:
      `elements` - An iterable of resolveAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setDepthStencilAttachment

    public final VulkanSubpassDescription.Builder setDepthStencilAttachment(VulkanAttachmentReference depthStencilAttachment)
    Initializes the optional value `depthStencilAttachment` to depthStencilAttachment.
    Parameters:
      `depthStencilAttachment` - The value for depthStencilAttachment
    Returns:
      `this` builder for chained invocation

  - ### setDepthStencilAttachment

    public final VulkanSubpassDescription.Builder setDepthStencilAttachment(Optional<? extends VulkanAttachmentReference> depthStencilAttachment)
    Initializes the optional value `depthStencilAttachment` to depthStencilAttachment.
    Parameters:
      `depthStencilAttachment` - The value for depthStencilAttachment
    Returns:
      `this` builder for use in a chained invocation

  - ### addPreserveAttachments

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

  - ### addPreserveAttachments

    public final VulkanSubpassDescription.Builder addPreserveAttachments(int... elements)
    Adds elements to `preserveAttachments` list.
    Parameters:
      `elements` - An array of preserveAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setPreserveAttachments

    public final VulkanSubpassDescription.Builder setPreserveAttachments(Iterable<Integer> elements)
    Sets or replaces all elements for `preserveAttachments` list.
    Parameters:
      `elements` - An iterable of preserveAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllPreserveAttachments

    public final VulkanSubpassDescription.Builder addAllPreserveAttachments(Iterable<Integer> elements)
    Adds elements to `preserveAttachments` list.
    Parameters:
      `elements` - An iterable of preserveAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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