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.
  • 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 or 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 or 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
    • copyOf

      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) // optional depth
         .setStencil(int) // optional stencil
         .build();
      
      Returns:
      A new VulkanClearValueDepthStencil builder