Class VulkanImageSubresourceLayers

java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresourceLayers
All Implemented Interfaces:
VulkanImageSubresourceLayersType

public final class VulkanImageSubresourceLayers extends Object implements VulkanImageSubresourceLayersType
Structure specifying a image subresource layers.
See Also:
  • "VkImageSubresourceLayers"
  • Method Details

    • aspectMask

      public Set<VulkanImageAspectFlag> aspectMask()
      Specified by:
      aspectMask in interface VulkanImageSubresourceLayersType
      Returns:
      a combination of flags selecting the color, depth, and/or stencil aspects to be copied.
    • mipLevel

      public int mipLevel()
      Specified by:
      mipLevel in interface VulkanImageSubresourceLayersType
      Returns:
      The mipmap level to copy from.
    • baseArrayLayer

      public int baseArrayLayer()
      Specified by:
      baseArrayLayer in interface VulkanImageSubresourceLayersType
      Returns:
      The starting layer to copy.
    • layerCount

      public int layerCount()
      Specified by:
      layerCount in interface VulkanImageSubresourceLayersType
      Returns:
      The number of layers to copy.
    • withAspectMask

      public final VulkanImageSubresourceLayers withAspectMask(VulkanImageAspectFlag... elements)
      Copy the current immutable object with elements that replace the content of aspectMask.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAspectMask

      public final VulkanImageSubresourceLayers withAspectMask(Iterable<VulkanImageAspectFlag> elements)
      Copy the current immutable object with elements that replace the content of aspectMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of aspectMask elements to set
      Returns:
      A modified copy of this object
    • withMipLevel

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

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

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

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanImageSubresourceLayers 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: aspectMask, mipLevel, baseArrayLayer, layerCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanImageSubresourceLayers of(Set<VulkanImageAspectFlag> aspectMask, int mipLevel, int baseArrayLayer, int layerCount)
      Construct a new immutable VulkanImageSubresourceLayers instance.
      Parameters:
      aspectMask - The value for the aspectMask attribute
      mipLevel - The value for the mipLevel attribute
      baseArrayLayer - The value for the baseArrayLayer attribute
      layerCount - The value for the layerCount attribute
      Returns:
      An immutable VulkanImageSubresourceLayers instance
    • of

      public static VulkanImageSubresourceLayers of(Iterable<VulkanImageAspectFlag> aspectMask, int mipLevel, int baseArrayLayer, int layerCount)
      Construct a new immutable VulkanImageSubresourceLayers instance.
      Parameters:
      aspectMask - The value for the aspectMask attribute
      mipLevel - The value for the mipLevel attribute
      baseArrayLayer - The value for the baseArrayLayer attribute
      layerCount - The value for the layerCount attribute
      Returns:
      An immutable VulkanImageSubresourceLayers instance
    • copyOf

      Creates an immutable copy of a VulkanImageSubresourceLayersType 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 VulkanImageSubresourceLayers instance
    • builder

      public static VulkanImageSubresourceLayers.Builder builder()
      Creates a builder for VulkanImageSubresourceLayers.
       VulkanImageSubresourceLayers.builder()
          .addAspectMask|addAllAspectMask(com.io7m.jcoronado.api.VulkanImageAspectFlag) // aspectMask elements
          .setMipLevel(int) // required mipLevel
          .setBaseArrayLayer(int) // required baseArrayLayer
          .setLayerCount(int) // required layerCount
          .build();
       
      Returns:
      A new VulkanImageSubresourceLayers builder