# Class VulkanAttachmentDescription.Builder

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

Enclosing class:
  `VulkanAttachmentDescription`

public static final class VulkanAttachmentDescription.Builder extends Object
Builds instances of type `VulkanAttachmentDescription`. 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 VulkanAttachmentDescription.Builder`
  `addAllFlags(Iterable<VulkanAttachmentDescriptionFlag> elements)`
  Adds elements to `flags` set.
  `final VulkanAttachmentDescription.Builder`
  `addFlags(VulkanAttachmentDescriptionFlag element)`
  Adds one element to `flags` set.
  `final VulkanAttachmentDescription.Builder`
  `addFlags(VulkanAttachmentDescriptionFlag... elements)`
  Adds elements to `flags` set.
  `VulkanAttachmentDescription`
  `build()`
  Builds a new `VulkanAttachmentDescription`.
  `final VulkanAttachmentDescription.Builder`
  `from(VulkanAttachmentDescriptionType instance)`
  Fill a builder with attribute values from the provided `VulkanAttachmentDescriptionType` instance.
  `final VulkanAttachmentDescription.Builder`
  `setFinalLayout(VulkanImageLayout finalLayout)`
  Initializes the value for the `finalLayout` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setFlags(Iterable<VulkanAttachmentDescriptionFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VulkanAttachmentDescription.Builder`
  `setFormat(VulkanFormat format)`
  Initializes the value for the `format` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setInitialLayout(VulkanImageLayout initialLayout)`
  Initializes the value for the `initialLayout` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setLoadOp(VulkanAttachmentLoadOp loadOp)`
  Initializes the value for the `loadOp` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setSamples(VulkanSampleCountFlag samples)`
  Initializes the value for the `samples` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setStencilLoadOp(VulkanAttachmentLoadOp stencilLoadOp)`
  Initializes the value for the `stencilLoadOp` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setStencilStoreOp(VulkanAttachmentStoreOp stencilStoreOp)`
  Initializes the value for the `stencilStoreOp` attribute.
  `final VulkanAttachmentDescription.Builder`
  `setStoreOp(VulkanAttachmentStoreOp storeOp)`
  Initializes the value for the `storeOp` attribute.

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

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

- ## Method Details

  - ### from

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

  - ### addFlags

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

  - ### setFormat

    public final VulkanAttachmentDescription.Builder setFormat(VulkanFormat format)
    Initializes the value for the `format` attribute.
    Parameters:
      `format` - The value for format
    Returns:
      `this` builder for use in a chained invocation

  - ### setSamples

    public final VulkanAttachmentDescription.Builder setSamples(VulkanSampleCountFlag samples)
    Initializes the value for the `samples` attribute.
    Parameters:
      `samples` - The value for samples
    Returns:
      `this` builder for use in a chained invocation

  - ### setLoadOp

    public final VulkanAttachmentDescription.Builder setLoadOp(VulkanAttachmentLoadOp loadOp)
    Initializes the value for the `loadOp` attribute.
    Parameters:
      `loadOp` - The value for loadOp
    Returns:
      `this` builder for use in a chained invocation

  - ### setStoreOp

    public final VulkanAttachmentDescription.Builder setStoreOp(VulkanAttachmentStoreOp storeOp)
    Initializes the value for the `storeOp` attribute.
    Parameters:
      `storeOp` - The value for storeOp
    Returns:
      `this` builder for use in a chained invocation

  - ### setStencilLoadOp

    public final VulkanAttachmentDescription.Builder setStencilLoadOp(VulkanAttachmentLoadOp stencilLoadOp)
    Initializes the value for the `stencilLoadOp` attribute.
    Parameters:
      `stencilLoadOp` - The value for stencilLoadOp
    Returns:
      `this` builder for use in a chained invocation

  - ### setStencilStoreOp

    public final VulkanAttachmentDescription.Builder setStencilStoreOp(VulkanAttachmentStoreOp stencilStoreOp)
    Initializes the value for the `stencilStoreOp` attribute.
    Parameters:
      `stencilStoreOp` - The value for stencilStoreOp
    Returns:
      `this` builder for use in a chained invocation

  - ### setInitialLayout

    public final VulkanAttachmentDescription.Builder setInitialLayout(VulkanImageLayout initialLayout)
    Initializes the value for the `initialLayout` attribute.
    Parameters:
      `initialLayout` - The value for initialLayout
    Returns:
      `this` builder for use in a chained invocation

  - ### setFinalLayout

    public final VulkanAttachmentDescription.Builder setFinalLayout(VulkanImageLayout finalLayout)
    Initializes the value for the `finalLayout` attribute.
    Parameters:
      `finalLayout` - The value for finalLayout
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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