# Class VulkanMemoryBarrier

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

All Implemented Interfaces:
  `VulkanMemoryBarrierType`

public final class VulkanMemoryBarrier extends Object implements VulkanMemoryBarrierType
Structure specifying the parameters of a global memory barrier.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanMemoryBarrier.Builder`
  `builder()`
  Creates a builder for `VulkanMemoryBarrier`.
  `static VulkanMemoryBarrier`
  `copyOf(VulkanMemoryBarrierType instance)`
  Creates an immutable copy of a `VulkanMemoryBarrierType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanMemoryBarrier` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `sourceAccessMask`, `targetAccessMask`.
  `static VulkanMemoryBarrier`
  `of(Iterable<VulkanAccessFlag> sourceAccessMask, Iterable<VulkanAccessFlag> targetAccessMask)`
  Construct a new immutable `VulkanMemoryBarrier` instance.
  `static VulkanMemoryBarrier`
  `of(Set<VulkanAccessFlag> sourceAccessMask, Set<VulkanAccessFlag> targetAccessMask)`
  Construct a new immutable `VulkanMemoryBarrier` instance.
  `Set<VulkanAccessFlag>`
  `sourceAccessMask()`
  `Set<VulkanAccessFlag>`
  `targetAccessMask()`
  `String`
  `toString()`
  Prints the immutable value `VulkanMemoryBarrier` with attribute values.
  `final VulkanMemoryBarrier`
  `withSourceAccessMask(VulkanAccessFlag... elements)`
  Copy the current immutable object with elements that replace the content of `sourceAccessMask`.
  `final VulkanMemoryBarrier`
  `withSourceAccessMask(Iterable<VulkanAccessFlag> elements)`
  Copy the current immutable object with elements that replace the content of `sourceAccessMask`.
  `final VulkanMemoryBarrier`
  `withTargetAccessMask(VulkanAccessFlag... elements)`
  Copy the current immutable object with elements that replace the content of `targetAccessMask`.
  `final VulkanMemoryBarrier`
  `withTargetAccessMask(Iterable<VulkanAccessFlag> elements)`
  Copy the current immutable object with elements that replace the content of `targetAccessMask`.

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

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

- ## Method Details

  - ### sourceAccessMask

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

  - ### targetAccessMask

    public Set<VulkanAccessFlag> targetAccessMask()
    Specified by:
      `targetAccessMask` in interface `VulkanMemoryBarrierType`
    Returns:
      The target access mask

  - ### withSourceAccessMask

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

  - ### withSourceAccessMask

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

  - ### withTargetAccessMask

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

  - ### withTargetAccessMask

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanMemoryBarrier` 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: `sourceAccessMask`, `targetAccessMask`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static VulkanMemoryBarrier of(Set<VulkanAccessFlag> sourceAccessMask, Set<VulkanAccessFlag> targetAccessMask)
    Construct a new immutable `VulkanMemoryBarrier` instance.
    Parameters:
      `sourceAccessMask` - The value for the `sourceAccessMask` attribute
      `targetAccessMask` - The value for the `targetAccessMask` attribute
    Returns:
      An immutable VulkanMemoryBarrier instance

  - ### of

    public static VulkanMemoryBarrier of(Iterable<VulkanAccessFlag> sourceAccessMask, Iterable<VulkanAccessFlag> targetAccessMask)
    Construct a new immutable `VulkanMemoryBarrier` instance.
    Parameters:
      `sourceAccessMask` - The value for the `sourceAccessMask` attribute
      `targetAccessMask` - The value for the `targetAccessMask` attribute
    Returns:
      An immutable VulkanMemoryBarrier instance

  - ### copyOf

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

  - ### builder

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

         VulkanMemoryBarrier.builder()
            .addSourceAccessMask|addAllSourceAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // sourceAccessMask elements
            .addTargetAccessMask|addAllTargetAccessMask(com.io7m.jcoronado.api.VulkanAccessFlag) // targetAccessMask elements
            .build();

    Returns:
      A new VulkanMemoryBarrier builder