# Class VulkanImageMemoryBarrier.Builder

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

Enclosing class:
  `VulkanImageMemoryBarrier`

public static final class VulkanImageMemoryBarrier.Builder extends Object
Builds instances of type `VulkanImageMemoryBarrier`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

`Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final VulkanImageMemoryBarrier.Builder`
  `addAllSourceAccessMask(Iterable<VulkanAccessFlag> elements)`
  Adds elements to `sourceAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `addAllTargetAccessMask(Iterable<VulkanAccessFlag> elements)`
  Adds elements to `targetAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `addSourceAccessMask(VulkanAccessFlag element)`
  Adds one element to `sourceAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `addSourceAccessMask(VulkanAccessFlag... elements)`
  Adds elements to `sourceAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `addTargetAccessMask(VulkanAccessFlag element)`
  Adds one element to `targetAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `addTargetAccessMask(VulkanAccessFlag... elements)`
  Adds elements to `targetAccessMask` set.
  `VulkanImageMemoryBarrier`
  `build()`
  Builds a new `VulkanImageMemoryBarrier`.
  `final VulkanImageMemoryBarrier.Builder`
  `from(VulkanImageMemoryBarrierType instance)`
  Fill a builder with attribute values from the provided `VulkanImageMemoryBarrierType` instance.
  `final VulkanImageMemoryBarrier.Builder`
  `setImage(VulkanImageType image)`
  Initializes the value for the `image` attribute.
  `final VulkanImageMemoryBarrier.Builder`
  `setNewLayout(VulkanImageLayout newLayout)`
  Initializes the value for the `newLayout` attribute.
  `final VulkanImageMemoryBarrier.Builder`
  `setOldLayout(VulkanImageLayout oldLayout)`
  Initializes the value for the `oldLayout` attribute.
  `final VulkanImageMemoryBarrier.Builder`
  `setSourceAccessMask(Iterable<VulkanAccessFlag> elements)`
  Sets or replaces all elements for `sourceAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `setSourceQueueFamilyIndex(VulkanQueueFamilyIndex sourceQueueFamilyIndex)`
  Initializes the value for the `sourceQueueFamilyIndex` attribute.
  `final VulkanImageMemoryBarrier.Builder`
  `setSubresourceRange(VulkanImageSubresourceRange subresourceRange)`
  Initializes the value for the `subresourceRange` attribute.
  `final VulkanImageMemoryBarrier.Builder`
  `setTargetAccessMask(Iterable<VulkanAccessFlag> elements)`
  Sets or replaces all elements for `targetAccessMask` set.
  `final VulkanImageMemoryBarrier.Builder`
  `setTargetQueueFamilyIndex(VulkanQueueFamilyIndex targetQueueFamilyIndex)`
  Initializes the value for the `targetQueueFamilyIndex` attribute.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final VulkanImageMemoryBarrier.Builder from(VulkanImageMemoryBarrierType instance)
    Fill a builder with attribute values from the provided `VulkanImageMemoryBarrierType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### addSourceAccessMask

    public final VulkanImageMemoryBarrier.Builder addSourceAccessMask(VulkanAccessFlag element)
    Adds one element to `sourceAccessMask` set.
    Parameters:
      `element` - A sourceAccessMask element
    Returns:
      `this` builder for use in a chained invocation

  - ### addSourceAccessMask

    public final VulkanImageMemoryBarrier.Builder addSourceAccessMask(VulkanAccessFlag... elements)
    Adds elements to `sourceAccessMask` set.
    Parameters:
      `elements` - An array of sourceAccessMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSourceAccessMask

    public final VulkanImageMemoryBarrier.Builder setSourceAccessMask(Iterable<VulkanAccessFlag> elements)
    Sets or replaces all elements for `sourceAccessMask` set.
    Parameters:
      `elements` - An iterable of sourceAccessMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllSourceAccessMask

    public final VulkanImageMemoryBarrier.Builder addAllSourceAccessMask(Iterable<VulkanAccessFlag> elements)
    Adds elements to `sourceAccessMask` set.
    Parameters:
      `elements` - An iterable of sourceAccessMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addTargetAccessMask

    public final VulkanImageMemoryBarrier.Builder addTargetAccessMask(VulkanAccessFlag element)
    Adds one element to `targetAccessMask` set.
    Parameters:
      `element` - A targetAccessMask element
    Returns:
      `this` builder for use in a chained invocation

  - ### addTargetAccessMask

    public final VulkanImageMemoryBarrier.Builder addTargetAccessMask(VulkanAccessFlag... elements)
    Adds elements to `targetAccessMask` set.
    Parameters:
      `elements` - An array of targetAccessMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setTargetAccessMask

    public final VulkanImageMemoryBarrier.Builder setTargetAccessMask(Iterable<VulkanAccessFlag> elements)
    Sets or replaces all elements for `targetAccessMask` set.
    Parameters:
      `elements` - An iterable of targetAccessMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllTargetAccessMask

    public final VulkanImageMemoryBarrier.Builder addAllTargetAccessMask(Iterable<VulkanAccessFlag> elements)
    Adds elements to `targetAccessMask` set.
    Parameters:
      `elements` - An iterable of targetAccessMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setOldLayout

    public final VulkanImageMemoryBarrier.Builder setOldLayout(VulkanImageLayout oldLayout)
    Initializes the value for the `oldLayout` attribute.
    Parameters:
      `oldLayout` - The value for oldLayout
    Returns:
      `this` builder for use in a chained invocation

  - ### setNewLayout

    public final VulkanImageMemoryBarrier.Builder setNewLayout(VulkanImageLayout newLayout)
    Initializes the value for the `newLayout` attribute.
    Parameters:
      `newLayout` - The value for newLayout
    Returns:
      `this` builder for use in a chained invocation

  - ### setSourceQueueFamilyIndex

    public final VulkanImageMemoryBarrier.Builder setSourceQueueFamilyIndex(VulkanQueueFamilyIndex sourceQueueFamilyIndex)
    Initializes the value for the `sourceQueueFamilyIndex` attribute.
    Parameters:
      `sourceQueueFamilyIndex` - The value for sourceQueueFamilyIndex
    Returns:
      `this` builder for use in a chained invocation

  - ### setTargetQueueFamilyIndex

    public final VulkanImageMemoryBarrier.Builder setTargetQueueFamilyIndex(VulkanQueueFamilyIndex targetQueueFamilyIndex)
    Initializes the value for the `targetQueueFamilyIndex` attribute.
    Parameters:
      `targetQueueFamilyIndex` - The value for targetQueueFamilyIndex
    Returns:
      `this` builder for use in a chained invocation

  - ### setImage

    public final VulkanImageMemoryBarrier.Builder setImage(VulkanImageType image)
    Initializes the value for the `image` attribute.
    Parameters:
      `image` - The value for image
    Returns:
      `this` builder for use in a chained invocation

  - ### setSubresourceRange

    public final VulkanImageMemoryBarrier.Builder setSubresourceRange(VulkanImageSubresourceRange subresourceRange)
    Initializes the value for the `subresourceRange` attribute.
    Parameters:
      `subresourceRange` - The value for subresourceRange
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public VulkanImageMemoryBarrier build()
    Builds a new `VulkanImageMemoryBarrier`.
    Returns:
      An immutable instance of VulkanImageMemoryBarrier
    Throws:
      `IllegalStateException` - if any required attributes are missing