# Class VulkanClearRectangle.Builder

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

Enclosing class:
  `VulkanClearRectangle`

public static final class VulkanClearRectangle.Builder extends Object
Builds instances of type `VulkanClearRectangle`. 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
  `VulkanClearRectangle`
  `build()`
  Builds a new `VulkanClearRectangle`.
  `final VulkanClearRectangle.Builder`
  `from(VulkanClearRectangleType instance)`
  Fill a builder with attribute values from the provided `VulkanClearRectangleType` instance.
  `final VulkanClearRectangle.Builder`
  `setBaseArrayLayer(int baseArrayLayer)`
  Initializes the value for the `baseArrayLayer` attribute.
  `final VulkanClearRectangle.Builder`
  `setLayerCount(int layerCount)`
  Initializes the value for the `layerCount` attribute.
  `final VulkanClearRectangle.Builder`
  `setRectangle(VulkanRectangle2D rectangle)`
  Initializes the value for the `rectangle` attribute.

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

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

- ## Method Details

  - ### from

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

  - ### setRectangle

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

  - ### setBaseArrayLayer

    public final VulkanClearRectangle.Builder setBaseArrayLayer(int baseArrayLayer)
    Initializes the value for the `baseArrayLayer` attribute.

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

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

  - ### setLayerCount

    public final VulkanClearRectangle.Builder setLayerCount(int layerCount)
    Initializes the value for the `layerCount` attribute.

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

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

  - ### build

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