# Class VulkanComponentMapping.Builder

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

Enclosing class:
  `VulkanComponentMapping`

public static final class VulkanComponentMapping.Builder extends Object
Builds instances of type `VulkanComponentMapping`. 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
  `VulkanComponentMapping`
  `build()`
  Builds a new `VulkanComponentMapping`.
  `final VulkanComponentMapping.Builder`
  `from(VulkanComponentMappingType instance)`
  Fill a builder with attribute values from the provided `VulkanComponentMappingType` instance.
  `final VulkanComponentMapping.Builder`
  `setA(VulkanComponentSwizzle a)`
  Initializes the value for the `a` attribute.
  `final VulkanComponentMapping.Builder`
  `setB(VulkanComponentSwizzle b)`
  Initializes the value for the `b` attribute.
  `final VulkanComponentMapping.Builder`
  `setG(VulkanComponentSwizzle g)`
  Initializes the value for the `g` attribute.
  `final VulkanComponentMapping.Builder`
  `setR(VulkanComponentSwizzle r)`
  Initializes the value for the `r` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final VulkanComponentMapping.Builder from(VulkanComponentMappingType instance)
    Fill a builder with attribute values from the provided `VulkanComponentMappingType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### setR

    public final VulkanComponentMapping.Builder setR(VulkanComponentSwizzle r)
    Initializes the value for the `r` attribute.

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

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

  - ### setG

    public final VulkanComponentMapping.Builder setG(VulkanComponentSwizzle g)
    Initializes the value for the `g` attribute.

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

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

  - ### setB

    public final VulkanComponentMapping.Builder setB(VulkanComponentSwizzle b)
    Initializes the value for the `b` attribute.

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

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

  - ### setA

    public final VulkanComponentMapping.Builder setA(VulkanComponentSwizzle a)
    Initializes the value for the `a` attribute.

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

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

  - ### build

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