# Class VulkanRenderingInfo.Builder

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

Enclosing class:
  `VulkanRenderingInfo`

public static final class VulkanRenderingInfo.Builder extends Object
Builds instances of type `VulkanRenderingInfo`. 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 VulkanRenderingInfo.Builder`
  `addAllColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements)`
  Adds elements to `colorAttachments` list.
  `final VulkanRenderingInfo.Builder`
  `addAllFlags(Iterable<VulkanRenderingFlag> elements)`
  Adds elements to `flags` set.
  `final VulkanRenderingInfo.Builder`
  `addColorAttachments(VulkanRenderingAttachmentInfo element)`
  Adds one element to `colorAttachments` list.
  `final VulkanRenderingInfo.Builder`
  `addColorAttachments(VulkanRenderingAttachmentInfo... elements)`
  Adds elements to `colorAttachments` list.
  `final VulkanRenderingInfo.Builder`
  `addFlags(VulkanRenderingFlag element)`
  Adds one element to `flags` set.
  `final VulkanRenderingInfo.Builder`
  `addFlags(VulkanRenderingFlag... elements)`
  Adds elements to `flags` set.
  `VulkanRenderingInfo`
  `build()`
  Builds a new `VulkanRenderingInfo`.
  `final VulkanRenderingInfo.Builder`
  `from(VulkanRenderingInfoType instance)`
  Fill a builder with attribute values from the provided `VulkanRenderingInfoType` instance.
  `final VulkanRenderingInfo.Builder`
  `setColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements)`
  Sets or replaces all elements for `colorAttachments` list.
  `final VulkanRenderingInfo.Builder`
  `setDepthAttachment(VulkanRenderingAttachmentInfo depthAttachment)`
  Initializes the optional value `depthAttachment` to depthAttachment.
  `final VulkanRenderingInfo.Builder`
  `setDepthAttachment(Optional<? extends VulkanRenderingAttachmentInfo> depthAttachment)`
  Initializes the optional value `depthAttachment` to depthAttachment.
  `final VulkanRenderingInfo.Builder`
  `setFlags(Iterable<VulkanRenderingFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VulkanRenderingInfo.Builder`
  `setLayerCount(long layerCount)`
  Initializes the value for the `layerCount` attribute.
  `final VulkanRenderingInfo.Builder`
  `setRenderArea(VulkanRectangle2D renderArea)`
  Initializes the value for the `renderArea` attribute.
  `final VulkanRenderingInfo.Builder`
  `setStencilAttachment(VulkanRenderingAttachmentInfo stencilAttachment)`
  Initializes the optional value `stencilAttachment` to stencilAttachment.
  `final VulkanRenderingInfo.Builder`
  `setStencilAttachment(Optional<? extends VulkanRenderingAttachmentInfo> stencilAttachment)`
  Initializes the optional value `stencilAttachment` to stencilAttachment.
  `final VulkanRenderingInfo.Builder`
  `setViewMask(long viewMask)`
  Initializes the value for the `viewMask` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

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

  - ### addFlags

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

  - ### setRenderArea

    public final VulkanRenderingInfo.Builder setRenderArea(VulkanRectangle2D renderArea)
    Initializes the value for the `renderArea` attribute.
    Parameters:
      `renderArea` - The value for renderArea
    Returns:
      `this` builder for use in a chained invocation

  - ### setLayerCount

    public final VulkanRenderingInfo.Builder setLayerCount(long layerCount)
    Initializes the value for the `layerCount` attribute.
    Parameters:
      `layerCount` - The value for layerCount
    Returns:
      `this` builder for use in a chained invocation

  - ### setViewMask

    public final VulkanRenderingInfo.Builder setViewMask(long viewMask)
    Initializes the value for the `viewMask` attribute.

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

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

  - ### addColorAttachments

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

  - ### addColorAttachments

    public final VulkanRenderingInfo.Builder addColorAttachments(VulkanRenderingAttachmentInfo... 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 VulkanRenderingInfo.Builder setColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> 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 VulkanRenderingInfo.Builder addAllColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements)
    Adds elements to `colorAttachments` list.
    Parameters:
      `elements` - An iterable of colorAttachments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setDepthAttachment

    public final VulkanRenderingInfo.Builder setDepthAttachment(VulkanRenderingAttachmentInfo depthAttachment)
    Initializes the optional value `depthAttachment` to depthAttachment.
    Parameters:
      `depthAttachment` - The value for depthAttachment
    Returns:
      `this` builder for chained invocation

  - ### setDepthAttachment

    public final VulkanRenderingInfo.Builder setDepthAttachment(Optional<? extends VulkanRenderingAttachmentInfo> depthAttachment)
    Initializes the optional value `depthAttachment` to depthAttachment.
    Parameters:
      `depthAttachment` - The value for depthAttachment
    Returns:
      `this` builder for use in a chained invocation

  - ### setStencilAttachment

    public final VulkanRenderingInfo.Builder setStencilAttachment(VulkanRenderingAttachmentInfo stencilAttachment)
    Initializes the optional value `stencilAttachment` to stencilAttachment.
    Parameters:
      `stencilAttachment` - The value for stencilAttachment
    Returns:
      `this` builder for chained invocation

  - ### setStencilAttachment

    public final VulkanRenderingInfo.Builder setStencilAttachment(Optional<? extends VulkanRenderingAttachmentInfo> stencilAttachment)
    Initializes the optional value `stencilAttachment` to stencilAttachment.
    Parameters:
      `stencilAttachment` - The value for stencilAttachment
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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