# Class VulkanStencilOpState

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

All Implemented Interfaces:
  `VulkanStencilOpStateType`

public final class VulkanStencilOpState extends Object implements VulkanStencilOpStateType

See Also:
  - "VkStencilOpState"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanStencilOpState.Builder`
  `builder()`
  Creates a builder for `VulkanStencilOpState`.
  `int`
  `compareMask()`
  `VulkanCompareOp`
  `compareOp()`
  `static VulkanStencilOpState`
  `copyOf(VulkanStencilOpStateType instance)`
  Creates an immutable copy of a `VulkanStencilOpStateType` value.
  `VulkanStencilOp`
  `depthFailOp()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanStencilOpState` that have equal attribute values.
  `VulkanStencilOp`
  `failOp()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `failOp`, `passOp`, `depthFailOp`, `compareOp`, `compareMask`, `writeMask`, `reference`.
  `VulkanStencilOp`
  `passOp()`
  `int`
  `reference()`
  `String`
  `toString()`
  Prints the immutable value `VulkanStencilOpState` with attribute values.
  `final VulkanStencilOpState`
  `withCompareMask(int value)`
  Copy the current immutable object by setting a value for the `compareMask` attribute.
  `final VulkanStencilOpState`
  `withCompareOp(VulkanCompareOp value)`
  Copy the current immutable object by setting a value for the `compareOp` attribute.
  `final VulkanStencilOpState`
  `withDepthFailOp(VulkanStencilOp value)`
  Copy the current immutable object by setting a value for the `depthFailOp` attribute.
  `final VulkanStencilOpState`
  `withFailOp(VulkanStencilOp value)`
  Copy the current immutable object by setting a value for the `failOp` attribute.
  `final VulkanStencilOpState`
  `withPassOp(VulkanStencilOp value)`
  Copy the current immutable object by setting a value for the `passOp` attribute.
  `final VulkanStencilOpState`
  `withReference(int value)`
  Copy the current immutable object by setting a value for the `reference` attribute.
  `final VulkanStencilOpState`
  `withWriteMask(int value)`
  Copy the current immutable object by setting a value for the `writeMask` attribute.
  `int`
  `writeMask()`

  ### Methods inherited from class Object

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

- ## Method Details

  - ### failOp

    public VulkanStencilOp failOp()
    Specified by:
      `failOp` in interface `VulkanStencilOpStateType`
    Returns:
      The action performed on samples that fail the stencil test.

  - ### passOp

    public VulkanStencilOp passOp()
    Specified by:
      `passOp` in interface `VulkanStencilOpStateType`
    Returns:
      The action performed on samples that pass both the depth and stencil tests.

  - ### depthFailOp

    public VulkanStencilOp depthFailOp()
    Specified by:
      `depthFailOp` in interface `VulkanStencilOpStateType`
    Returns:
      The action performed on samples that pass the stencil test and fail the depth test.

  - ### compareOp

    public VulkanCompareOp compareOp()
    Specified by:
      `compareOp` in interface `VulkanStencilOpStateType`
    Returns:
      The comparison operator used in the stencil test.

  - ### compareMask

    public int compareMask()
    Specified by:
      `compareMask` in interface `VulkanStencilOpStateType`
    Returns:
      The bits of the unsigned integer stencil values participating in the stencil test.

  - ### writeMask

    public int writeMask()
    Specified by:
      `writeMask` in interface `VulkanStencilOpStateType`
    Returns:
      The bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment.

  - ### reference

    public int reference()
    Specified by:
      `reference` in interface `VulkanStencilOpStateType`
    Returns:
      An integer reference value that is used in the unsigned stencil comparison.

  - ### withFailOp

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

  - ### withPassOp

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

  - ### withDepthFailOp

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

  - ### withCompareOp

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

  - ### withCompareMask

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

  - ### withWriteMask

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

  - ### withReference

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanStencilOpState` 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: `failOp`, `passOp`, `depthFailOp`, `compareOp`, `compareMask`, `writeMask`, `reference`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

    public static VulkanStencilOpState copyOf(VulkanStencilOpStateType instance)
    Creates an immutable copy of a `VulkanStencilOpStateType` 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 VulkanStencilOpState instance

  - ### builder

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

        VulkanStencilOpState.builder()
           .setFailOp(com.io7m.jcoronado.api.VulkanStencilOp) // optional failOp
           .setPassOp(com.io7m.jcoronado.api.VulkanStencilOp) // optional passOp
           .setDepthFailOp(com.io7m.jcoronado.api.VulkanStencilOp) // optional depthFailOp
           .setCompareOp(com.io7m.jcoronado.api.VulkanCompareOp) // optional compareOp
           .setCompareMask(int) // optional compareMask
           .setWriteMask(int) // optional writeMask
           .setReference(int) // optional reference
           .build();

    Returns:
      A new VulkanStencilOpState builder