# Class VulkanSubpassDependency

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

All Implemented Interfaces:
  `VulkanSubpassDependencyType`

public final class VulkanSubpassDependency extends Object implements VulkanSubpassDependencyType
Structure specifying a subpass dependency.

See Also:
  - "VkSubpassDependency"

- ## Nested Class Summary

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

- ## Field Summary

  ### Fields inherited from interface com.io7m.jcoronado.api.VulkanSubpassDependencyType

  `EXTERNAL`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanSubpassDependency.Builder`
  `builder()`
  Creates a builder for `VulkanSubpassDependency`.
  `static VulkanSubpassDependency`
  `copyOf(VulkanSubpassDependencyType instance)`
  Creates an immutable copy of a `VulkanSubpassDependencyType` value.
  `Set<VulkanDependencyFlag>`
  `dependencyFlags()`
  `Set<VulkanAccessFlag>`
  `dstAccessMask()`
  `Set<VulkanPipelineStageFlag>`
  `dstStageMask()`
  `int`
  `dstSubpass()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanSubpassDependency` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `srcSubpass`, `dstSubpass`, `srcStageMask`, `dstStageMask`, `srcAccessMask`, `dstAccessMask`, `dependencyFlags`.
  `static VulkanSubpassDependency`
  `of(int srcSubpass, int dstSubpass, Iterable<VulkanPipelineStageFlag> srcStageMask, Iterable<VulkanPipelineStageFlag> dstStageMask, Iterable<VulkanAccessFlag> srcAccessMask, Iterable<VulkanAccessFlag> dstAccessMask, Iterable<VulkanDependencyFlag> dependencyFlags)`
  Construct a new immutable `VulkanSubpassDependency` instance.
  `static VulkanSubpassDependency`
  `of(int srcSubpass, int dstSubpass, Set<VulkanPipelineStageFlag> srcStageMask, Set<VulkanPipelineStageFlag> dstStageMask, Set<VulkanAccessFlag> srcAccessMask, Set<VulkanAccessFlag> dstAccessMask, Set<VulkanDependencyFlag> dependencyFlags)`
  Construct a new immutable `VulkanSubpassDependency` instance.
  `Set<VulkanAccessFlag>`
  `srcAccessMask()`
  `Set<VulkanPipelineStageFlag>`
  `srcStageMask()`
  `int`
  `srcSubpass()`
  `String`
  `toString()`
  Prints the immutable value `VulkanSubpassDependency` with attribute values.
  `final VulkanSubpassDependency`
  `withDependencyFlags(VulkanDependencyFlag... elements)`
  Copy the current immutable object with elements that replace the content of `dependencyFlags`.
  `final VulkanSubpassDependency`
  `withDependencyFlags(Iterable<VulkanDependencyFlag> elements)`
  Copy the current immutable object with elements that replace the content of `dependencyFlags`.
  `final VulkanSubpassDependency`
  `withDstAccessMask(VulkanAccessFlag... elements)`
  Copy the current immutable object with elements that replace the content of `dstAccessMask`.
  `final VulkanSubpassDependency`
  `withDstAccessMask(Iterable<VulkanAccessFlag> elements)`
  Copy the current immutable object with elements that replace the content of `dstAccessMask`.
  `final VulkanSubpassDependency`
  `withDstStageMask(VulkanPipelineStageFlag... elements)`
  Copy the current immutable object with elements that replace the content of `dstStageMask`.
  `final VulkanSubpassDependency`
  `withDstStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Copy the current immutable object with elements that replace the content of `dstStageMask`.
  `final VulkanSubpassDependency`
  `withDstSubpass(int value)`
  Copy the current immutable object by setting a value for the `dstSubpass` attribute.
  `final VulkanSubpassDependency`
  `withSrcAccessMask(VulkanAccessFlag... elements)`
  Copy the current immutable object with elements that replace the content of `srcAccessMask`.
  `final VulkanSubpassDependency`
  `withSrcAccessMask(Iterable<VulkanAccessFlag> elements)`
  Copy the current immutable object with elements that replace the content of `srcAccessMask`.
  `final VulkanSubpassDependency`
  `withSrcStageMask(VulkanPipelineStageFlag... elements)`
  Copy the current immutable object with elements that replace the content of `srcStageMask`.
  `final VulkanSubpassDependency`
  `withSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Copy the current immutable object with elements that replace the content of `srcStageMask`.
  `final VulkanSubpassDependency`
  `withSrcSubpass(int value)`
  Copy the current immutable object by setting a value for the `srcSubpass` attribute.

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

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

- ## Method Details

  - ### srcSubpass

    public int srcSubpass()
    Specified by:
      `srcSubpass` in interface `VulkanSubpassDependencyType`
    Returns:
      The subpass index of the first subpass in the dependency, or VK_SUBPASS_EXTERNAL.

  - ### dstSubpass

    public int dstSubpass()
    Specified by:
      `dstSubpass` in interface `VulkanSubpassDependencyType`
    Returns:
      The subpass index of the second subpass in the dependency, or VK_SUBPASS_EXTERNAL.

  - ### srcStageMask

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

  - ### dstStageMask

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

  - ### srcAccessMask

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

  - ### dstAccessMask

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

  - ### dependencyFlags

    public Set<VulkanDependencyFlag> dependencyFlags()
    Specified by:
      `dependencyFlags` in interface `VulkanSubpassDependencyType`
    Returns:
      The dependency flags for the subpass

  - ### withSrcSubpass

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

  - ### withDstSubpass

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

  - ### withSrcStageMask

    public final VulkanSubpassDependency 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 VulkanSubpassDependency 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 of `this` object

  - ### withDstStageMask

    public final VulkanSubpassDependency 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 VulkanSubpassDependency 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 of `this` object

  - ### withSrcAccessMask

    public final VulkanSubpassDependency 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 VulkanSubpassDependency 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 of `this` object

  - ### withDstAccessMask

    public final VulkanSubpassDependency 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 VulkanSubpassDependency 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 of `this` object

  - ### withDependencyFlags

    public final VulkanSubpassDependency withDependencyFlags(VulkanDependencyFlag... elements)
    Copy the current immutable object with elements that replace the content of `dependencyFlags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withDependencyFlags

    public final VulkanSubpassDependency withDependencyFlags(Iterable<VulkanDependencyFlag> elements)
    Copy the current immutable object with elements that replace the content of `dependencyFlags`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of dependencyFlags elements to set
    Returns:
      A modified copy of `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanSubpassDependency` 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: `srcSubpass`, `dstSubpass`, `srcStageMask`, `dstStageMask`, `srcAccessMask`, `dstAccessMask`, `dependencyFlags`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static VulkanSubpassDependency of(int srcSubpass, int dstSubpass, Set<VulkanPipelineStageFlag> srcStageMask, Set<VulkanPipelineStageFlag> dstStageMask, Set<VulkanAccessFlag> srcAccessMask, Set<VulkanAccessFlag> dstAccessMask, Set<VulkanDependencyFlag> dependencyFlags)
    Construct a new immutable `VulkanSubpassDependency` instance.
    Parameters:
      `srcSubpass` - The value for the `srcSubpass` attribute
      `dstSubpass` - The value for the `dstSubpass` attribute
      `srcStageMask` - The value for the `srcStageMask` attribute
      `dstStageMask` - The value for the `dstStageMask` attribute
      `srcAccessMask` - The value for the `srcAccessMask` attribute
      `dstAccessMask` - The value for the `dstAccessMask` attribute
      `dependencyFlags` - The value for the `dependencyFlags` attribute
    Returns:
      An immutable VulkanSubpassDependency instance

  - ### of

    public static VulkanSubpassDependency of(int srcSubpass, int dstSubpass, Iterable<VulkanPipelineStageFlag> srcStageMask, Iterable<VulkanPipelineStageFlag> dstStageMask, Iterable<VulkanAccessFlag> srcAccessMask, Iterable<VulkanAccessFlag> dstAccessMask, Iterable<VulkanDependencyFlag> dependencyFlags)
    Construct a new immutable `VulkanSubpassDependency` instance.
    Parameters:
      `srcSubpass` - The value for the `srcSubpass` attribute
      `dstSubpass` - The value for the `dstSubpass` attribute
      `srcStageMask` - The value for the `srcStageMask` attribute
      `dstStageMask` - The value for the `dstStageMask` attribute
      `srcAccessMask` - The value for the `srcAccessMask` attribute
      `dstAccessMask` - The value for the `dstAccessMask` attribute
      `dependencyFlags` - The value for the `dependencyFlags` attribute
    Returns:
      An immutable VulkanSubpassDependency instance

  - ### copyOf

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

  - ### builder

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

         VulkanSubpassDependency.builder()
            .setSrcSubpass(int) // required srcSubpass
            .setDstSubpass(int) // required dstSubpass
            .addSrcStageMask|addAllSrcStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // srcStageMask elements
            .addDstStageMask|addAllDstStageMask(com.io7m.jcoronado.api.VulkanPipelineStageFlag) // dstStageMask elements
            .addSrcAccessMask|addAllSrcAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // srcAccessMask elements
            .addDstAccessMask|addAllDstAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // dstAccessMask elements
            .addDependencyFlags|addAllDependencyFlags(com.io7m.jcoronado.api.VulkanDependencyFlag) // dependencyFlags elements
            .build();

    Returns:
      A new VulkanSubpassDependency builder