# Class VulkanClearValueDepthStencil

java.lang.Object
com.io7m.jcoronado.api.VulkanClearValueDepthStencil

All Implemented Interfaces:
  `VulkanClearValueType`, `VulkanClearValueType.VulkanClearValueDepthStencilType`

public final class VulkanClearValueDepthStencil extends Object implements VulkanClearValueType.VulkanClearValueDepthStencilType
A depth/stencil value.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VulkanClearValueDepthStencil.Builder`
  Builds instances of type `VulkanClearValueDepthStencil`.

  ### Nested classes/interfaces inherited from interface com.io7m.jcoronado.api.VulkanClearValueType

  `VulkanClearValueType.Type, VulkanClearValueType.VulkanClearValueColorFloatingPointType, VulkanClearValueType.VulkanClearValueColorIntegerSignedType, VulkanClearValueType.VulkanClearValueColorIntegerUnsignedType, VulkanClearValueType.VulkanClearValueColorType, VulkanClearValueType.VulkanClearValueDepthStencilType`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanClearValueDepthStencil.Builder`
  `builder()`
  Creates a builder for `VulkanClearValueDepthStencil`.
  `static VulkanClearValueDepthStencil`
  `copyOf(VulkanClearValueType.VulkanClearValueDepthStencilType instance)`
  Creates an immutable copy of a `VulkanClearValueType.VulkanClearValueDepthStencilType` value.
  `float`
  `depth()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanClearValueDepthStencil` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `depth`, `stencil`.
  `static VulkanClearValueDepthStencil`
  `of(float depth, int stencil)`
  Construct a new immutable `VulkanClearValueDepthStencil` instance.
  `int`
  `stencil()`
  `String`
  `toString()`
  Prints the immutable value `VulkanClearValueDepthStencil` with attribute values.
  `final VulkanClearValueDepthStencil`
  `withDepth(float value)`
  Copy the current immutable object by setting a value for the `depth` attribute.
  `final VulkanClearValueDepthStencil`
  `withStencil(int value)`
  Copy the current immutable object by setting a value for the `stencil` attribute.

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.jcoronado.api.VulkanClearValueType.VulkanClearValueDepthStencilType

  `type`

- ## Method Details

  - ### depth

    public float depth()
    Specified by:
      `depth` in interface `VulkanClearValueType.VulkanClearValueDepthStencilType`
    Returns:
      The depth value

  - ### stencil

    public int stencil()
    Specified by:
      `stencil` in interface `VulkanClearValueType.VulkanClearValueDepthStencilType`
    Returns:
      The stencil value

  - ### withDepth

    public final VulkanClearValueDepthStencil withDepth(float value)
    Copy the current immutable object by setting a value for the `depth` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for depth
    Returns:
      A modified copy of the `this` object

  - ### withStencil

    public final VulkanClearValueDepthStencil withStencil(int value)
    Copy the current immutable object by setting a value for the `stencil` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for stencil
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanClearValueDepthStencil` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `depth`, `stencil`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `VulkanClearValueDepthStencil` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### of

    public static VulkanClearValueDepthStencil of(float depth, int stencil)
    Construct a new immutable `VulkanClearValueDepthStencil` instance.
    Parameters:
      `depth` - The value for the `depth` attribute
      `stencil` - The value for the `stencil` attribute
    Returns:
      An immutable VulkanClearValueDepthStencil instance

  - ### copyOf

    public static VulkanClearValueDepthStencil copyOf(VulkanClearValueType.VulkanClearValueDepthStencilType instance)
    Creates an immutable copy of a `VulkanClearValueType.VulkanClearValueDepthStencilType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable VulkanClearValueDepthStencil instance

  - ### builder

    public static VulkanClearValueDepthStencil.Builder builder()
    Creates a builder for `VulkanClearValueDepthStencil`.

         VulkanClearValueDepthStencil.builder()
            .setDepth(float) // required depth
            .setStencil(int) // required stencil
            .build();

    Returns:
      A new VulkanClearValueDepthStencil builder