# Class VulkanImageMemoryBarrier

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

All Implemented Interfaces:
  `VulkanImageMemoryBarrierType`

public final class VulkanImageMemoryBarrier extends Object implements VulkanImageMemoryBarrierType
Structure specifying the parameters of an image memory barrier.

See Also:
  - "VkImageMemoryBarrier"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanImageMemoryBarrier.Builder`
  `builder()`
  Creates a builder for `VulkanImageMemoryBarrier`.
  `static VulkanImageMemoryBarrier`
  `copyOf(VulkanImageMemoryBarrierType instance)`
  Creates an immutable copy of a `VulkanImageMemoryBarrierType` value.
  `Set<VulkanAccessFlag>`
  `dstAccessMask()`
  `VulkanQueueFamilyIndex`
  `dstQueueFamilyIndex()`
  `Set<VulkanPipelineStageFlag>`
  `dstStageMask()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanImageMemoryBarrier` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `srcStageMask`, `srcAccessMask`, `dstStageMask`, `dstAccessMask`, `oldLayout`, `newLayout`, `srcQueueFamilyIndex`, `dstQueueFamilyIndex`, `image`, `subresourceRange`.
  `VulkanImageType`
  `image()`
  `VulkanImageLayout`
  `newLayout()`
  `VulkanImageLayout`
  `oldLayout()`
  `Set<VulkanAccessFlag>`
  `srcAccessMask()`
  `VulkanQueueFamilyIndex`
  `srcQueueFamilyIndex()`
  `Set<VulkanPipelineStageFlag>`
  `srcStageMask()`
  `VulkanImageSubresourceRange`
  `subresourceRange()`
  `String`
  `toString()`
  Prints the immutable value `VulkanImageMemoryBarrier` with attribute values.
  `final VulkanImageMemoryBarrier`
  `withDstAccessMask(VulkanAccessFlag... elements)`
  Copy the current immutable object with elements that replace the content of `dstAccessMask`.
  `final VulkanImageMemoryBarrier`
  `withDstAccessMask(Iterable<VulkanAccessFlag> elements)`
  Copy the current immutable object with elements that replace the content of `dstAccessMask`.
  `final VulkanImageMemoryBarrier`
  `withDstQueueFamilyIndex(VulkanQueueFamilyIndex value)`
  Copy the current immutable object by setting a value for the `dstQueueFamilyIndex` attribute.
  `final VulkanImageMemoryBarrier`
  `withDstStageMask(VulkanPipelineStageFlag... elements)`
  Copy the current immutable object with elements that replace the content of `dstStageMask`.
  `final VulkanImageMemoryBarrier`
  `withDstStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Copy the current immutable object with elements that replace the content of `dstStageMask`.
  `final VulkanImageMemoryBarrier`
  `withImage(VulkanImageType value)`
  Copy the current immutable object by setting a value for the `image` attribute.
  `final VulkanImageMemoryBarrier`
  `withNewLayout(VulkanImageLayout value)`
  Copy the current immutable object by setting a value for the `newLayout` attribute.
  `final VulkanImageMemoryBarrier`
  `withOldLayout(VulkanImageLayout value)`
  Copy the current immutable object by setting a value for the `oldLayout` attribute.
  `final VulkanImageMemoryBarrier`
  `withSrcAccessMask(VulkanAccessFlag... elements)`
  Copy the current immutable object with elements that replace the content of `srcAccessMask`.
  `final VulkanImageMemoryBarrier`
  `withSrcAccessMask(Iterable<VulkanAccessFlag> elements)`
  Copy the current immutable object with elements that replace the content of `srcAccessMask`.
  `final VulkanImageMemoryBarrier`
  `withSrcQueueFamilyIndex(VulkanQueueFamilyIndex value)`
  Copy the current immutable object by setting a value for the `srcQueueFamilyIndex` attribute.
  `final VulkanImageMemoryBarrier`
  `withSrcStageMask(VulkanPipelineStageFlag... elements)`
  Copy the current immutable object with elements that replace the content of `srcStageMask`.
  `final VulkanImageMemoryBarrier`
  `withSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Copy the current immutable object with elements that replace the content of `srcStageMask`.
  `final VulkanImageMemoryBarrier`
  `withSubresourceRange(VulkanImageSubresourceRange value)`
  Copy the current immutable object by setting a value for the `subresourceRange` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### srcStageMask

    public Set<VulkanPipelineStageFlag> srcStageMask()
    Specified by:
      `srcStageMask` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The source stage mask

  - ### srcAccessMask

    public Set<VulkanAccessFlag> srcAccessMask()
    Specified by:
      `srcAccessMask` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The source access mask

  - ### dstStageMask

    public Set<VulkanPipelineStageFlag> dstStageMask()
    Specified by:
      `dstStageMask` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The destination stage mask

  - ### dstAccessMask

    public Set<VulkanAccessFlag> dstAccessMask()
    Specified by:
      `dstAccessMask` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The destination access mask

  - ### oldLayout

    public VulkanImageLayout oldLayout()
    Specified by:
      `oldLayout` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The original image layout

  - ### newLayout

    public VulkanImageLayout newLayout()
    Specified by:
      `newLayout` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The target image layout

  - ### srcQueueFamilyIndex

    public VulkanQueueFamilyIndex srcQueueFamilyIndex()
    Specified by:
      `srcQueueFamilyIndex` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The source queue family for a queue family ownership transfer.

  - ### dstQueueFamilyIndex

    public VulkanQueueFamilyIndex dstQueueFamilyIndex()
    Specified by:
      `dstQueueFamilyIndex` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The target queue family for a queue family ownership transfer.

  - ### image

    public VulkanImageType image()
    Specified by:
      `image` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The image affected by this barrier.

  - ### subresourceRange

    public VulkanImageSubresourceRange subresourceRange()
    Specified by:
      `subresourceRange` in interface `VulkanImageMemoryBarrierType`
    Returns:
      The image subresource range within image that is affected by this barrier.

  - ### withSrcStageMask

    public final VulkanImageMemoryBarrier withSrcStageMask(VulkanPipelineStageFlag... elements)
    Copy the current immutable object with elements that replace the content of `srcStageMask`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withSrcStageMask

    public final VulkanImageMemoryBarrier withSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)
    Copy the current immutable object with elements that replace the content of `srcStageMask`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of srcStageMask elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withSrcAccessMask

    public final VulkanImageMemoryBarrier withSrcAccessMask(VulkanAccessFlag... elements)
    Copy the current immutable object with elements that replace the content of `srcAccessMask`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withSrcAccessMask

    public final VulkanImageMemoryBarrier withSrcAccessMask(Iterable<VulkanAccessFlag> elements)
    Copy the current immutable object with elements that replace the content of `srcAccessMask`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of srcAccessMask elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withDstStageMask

    public final VulkanImageMemoryBarrier withDstStageMask(VulkanPipelineStageFlag... elements)
    Copy the current immutable object with elements that replace the content of `dstStageMask`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withDstStageMask

    public final VulkanImageMemoryBarrier withDstStageMask(Iterable<VulkanPipelineStageFlag> elements)
    Copy the current immutable object with elements that replace the content of `dstStageMask`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of dstStageMask elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withDstAccessMask

    public final VulkanImageMemoryBarrier withDstAccessMask(VulkanAccessFlag... elements)
    Copy the current immutable object with elements that replace the content of `dstAccessMask`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withDstAccessMask

    public final VulkanImageMemoryBarrier withDstAccessMask(Iterable<VulkanAccessFlag> elements)
    Copy the current immutable object with elements that replace the content of `dstAccessMask`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of dstAccessMask elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withOldLayout

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

  - ### withNewLayout

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

  - ### withSrcQueueFamilyIndex

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

  - ### withDstQueueFamilyIndex

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

  - ### withImage

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

  - ### withSubresourceRange

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanImageMemoryBarrier` 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: `srcStageMask`, `srcAccessMask`, `dstStageMask`, `dstAccessMask`, `oldLayout`, `newLayout`, `srcQueueFamilyIndex`, `dstQueueFamilyIndex`, `image`, `subresourceRange`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

        VulkanImageMemoryBarrier.builder()
           .addSrcStageMask|addAllSrcStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // srcStageMask elements
           .addSrcAccessMask|addAllSrcAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // srcAccessMask elements
           .addDstStageMask|addAllDstStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // dstStageMask elements
           .addDstAccessMask|addAllDstAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // dstAccessMask elements
           .setOldLayout(com.io7m.jcoronado.api.VulkanImageLayout) // required oldLayout
           .setNewLayout(com.io7m.jcoronado.api.VulkanImageLayout) // required newLayout
           .setSrcQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required srcQueueFamilyIndex
           .setDstQueueFamilyIndex(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) // required dstQueueFamilyIndex
           .setImage(com.io7m.jcoronado.api.VulkanImageType) // required image
           .setSubresourceRange(com.io7m.jcoronado.api.VulkanImageSubresourceRange) // required subresourceRange
           .build();

    Returns:
      A new VulkanImageMemoryBarrier builder