# Class VulkanPipelineColorBlendAttachmentState.Builder

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

Enclosing class:
  `VulkanPipelineColorBlendAttachmentState`

public static final class VulkanPipelineColorBlendAttachmentState.Builder extends Object
Builds instances of type `VulkanPipelineColorBlendAttachmentState`. 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 VulkanPipelineColorBlendAttachmentState.Builder`
  `addAllColorWriteMask(Iterable<VulkanColorComponentFlag> elements)`
  Adds elements to `colorWriteMask` set.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `addColorWriteMask(VulkanColorComponentFlag element)`
  Adds one element to `colorWriteMask` set.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `addColorWriteMask(VulkanColorComponentFlag... elements)`
  Adds elements to `colorWriteMask` set.
  `VulkanPipelineColorBlendAttachmentState`
  `build()`
  Builds a new `VulkanPipelineColorBlendAttachmentState`.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `from(VulkanPipelineColorBlendAttachmentStateType instance)`
  Fill a builder with attribute values from the provided `VulkanPipelineColorBlendAttachmentStateType` instance.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setAlphaBlendOp(VulkanBlendOp alphaBlendOp)`
  Initializes the value for the `alphaBlendOp` attribute.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setColorBlendOp(VulkanBlendOp colorBlendOp)`
  Initializes the value for the `colorBlendOp` attribute.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setColorWriteMask(Iterable<VulkanColorComponentFlag> elements)`
  Sets or replaces all elements for `colorWriteMask` set.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setDstAlphaBlendFactor(VulkanBlendFactor dstAlphaBlendFactor)`
  Initializes the value for the `dstAlphaBlendFactor` attribute.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setDstColorBlendFactor(VulkanBlendFactor dstColorBlendFactor)`
  Initializes the value for the `dstColorBlendFactor` attribute.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setEnable(boolean enable)`
  Initializes the value for the `enable` attribute.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setSrcAlphaBlendFactor(VulkanBlendFactor srcAlphaBlendFactor)`
  Initializes the value for the `srcAlphaBlendFactor` attribute.
  `final VulkanPipelineColorBlendAttachmentState.Builder`
  `setSrcColorBlendFactor(VulkanBlendFactor srcColorBlendFactor)`
  Initializes the value for the `srcColorBlendFactor` attribute.

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

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

- ## Method Details

  - ### from

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

  - ### setEnable

    public final VulkanPipelineColorBlendAttachmentState.Builder setEnable(boolean enable)
    Initializes the value for the `enable` attribute.
    Parameters:
      `enable` - The value for enable
    Returns:
      `this` builder for use in a chained invocation

  - ### setSrcColorBlendFactor

    public final VulkanPipelineColorBlendAttachmentState.Builder setSrcColorBlendFactor(VulkanBlendFactor srcColorBlendFactor)
    Initializes the value for the `srcColorBlendFactor` attribute.

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

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

  - ### setDstColorBlendFactor

    public final VulkanPipelineColorBlendAttachmentState.Builder setDstColorBlendFactor(VulkanBlendFactor dstColorBlendFactor)
    Initializes the value for the `dstColorBlendFactor` attribute.

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

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

  - ### setColorBlendOp

    public final VulkanPipelineColorBlendAttachmentState.Builder setColorBlendOp(VulkanBlendOp colorBlendOp)
    Initializes the value for the `colorBlendOp` attribute.

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

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

  - ### setSrcAlphaBlendFactor

    public final VulkanPipelineColorBlendAttachmentState.Builder setSrcAlphaBlendFactor(VulkanBlendFactor srcAlphaBlendFactor)
    Initializes the value for the `srcAlphaBlendFactor` attribute.

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

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

  - ### setDstAlphaBlendFactor

    public final VulkanPipelineColorBlendAttachmentState.Builder setDstAlphaBlendFactor(VulkanBlendFactor dstAlphaBlendFactor)
    Initializes the value for the `dstAlphaBlendFactor` attribute.

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

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

  - ### setAlphaBlendOp

    public final VulkanPipelineColorBlendAttachmentState.Builder setAlphaBlendOp(VulkanBlendOp alphaBlendOp)
    Initializes the value for the `alphaBlendOp` attribute.

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

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

  - ### addColorWriteMask

    public final VulkanPipelineColorBlendAttachmentState.Builder addColorWriteMask(VulkanColorComponentFlag element)
    Adds one element to `colorWriteMask` set.
    Parameters:
      `element` - A colorWriteMask element
    Returns:
      `this` builder for use in a chained invocation

  - ### addColorWriteMask

    public final VulkanPipelineColorBlendAttachmentState.Builder addColorWriteMask(VulkanColorComponentFlag... elements)
    Adds elements to `colorWriteMask` set.
    Parameters:
      `elements` - An array of colorWriteMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setColorWriteMask

    public final VulkanPipelineColorBlendAttachmentState.Builder setColorWriteMask(Iterable<VulkanColorComponentFlag> elements)
    Sets or replaces all elements for `colorWriteMask` set.
    Parameters:
      `elements` - An iterable of colorWriteMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllColorWriteMask

    public final VulkanPipelineColorBlendAttachmentState.Builder addAllColorWriteMask(Iterable<VulkanColorComponentFlag> elements)
    Adds elements to `colorWriteMask` set.
    Parameters:
      `elements` - An iterable of colorWriteMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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