# Class VulkanBufferMemoryBarrier.Builder

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

Enclosing class:
  `VulkanBufferMemoryBarrier`

public static final class VulkanBufferMemoryBarrier.Builder extends Object
Builds instances of type `VulkanBufferMemoryBarrier`. 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 VulkanBufferMemoryBarrier.Builder`
  `addAllDstAccessMask(Iterable<VulkanAccessFlag> elements)`
  Adds elements to `dstAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addAllDstStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Adds elements to `dstStageMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addAllSrcAccessMask(Iterable<VulkanAccessFlag> elements)`
  Adds elements to `srcAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addAllSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Adds elements to `srcStageMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addDstAccessMask(VulkanAccessFlag element)`
  Adds one element to `dstAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addDstAccessMask(VulkanAccessFlag... elements)`
  Adds elements to `dstAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addDstStageMask(VulkanPipelineStageFlag element)`
  Adds one element to `dstStageMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addDstStageMask(VulkanPipelineStageFlag... elements)`
  Adds elements to `dstStageMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addSrcAccessMask(VulkanAccessFlag element)`
  Adds one element to `srcAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addSrcAccessMask(VulkanAccessFlag... elements)`
  Adds elements to `srcAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addSrcStageMask(VulkanPipelineStageFlag element)`
  Adds one element to `srcStageMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `addSrcStageMask(VulkanPipelineStageFlag... elements)`
  Adds elements to `srcStageMask` set.
  `VulkanBufferMemoryBarrier`
  `build()`
  Builds a new `VulkanBufferMemoryBarrier`.
  `final VulkanBufferMemoryBarrier.Builder`
  `from(VulkanBufferMemoryBarrierType instance)`
  Fill a builder with attribute values from the provided `VulkanBufferMemoryBarrierType` instance.
  `final VulkanBufferMemoryBarrier.Builder`
  `setBuffer(VulkanBufferType buffer)`
  Initializes the value for the `buffer` attribute.
  `final VulkanBufferMemoryBarrier.Builder`
  `setDstAccessMask(Iterable<VulkanAccessFlag> elements)`
  Sets or replaces all elements for `dstAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `setDstQueueFamilyIndex(VulkanQueueFamilyIndex dstQueueFamilyIndex)`
  Initializes the value for the `dstQueueFamilyIndex` attribute.
  `final VulkanBufferMemoryBarrier.Builder`
  `setDstStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Sets or replaces all elements for `dstStageMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `setOffset(long offset)`
  Initializes the value for the `offset` attribute.
  `final VulkanBufferMemoryBarrier.Builder`
  `setSize(long size)`
  Initializes the value for the `size` attribute.
  `final VulkanBufferMemoryBarrier.Builder`
  `setSrcAccessMask(Iterable<VulkanAccessFlag> elements)`
  Sets or replaces all elements for `srcAccessMask` set.
  `final VulkanBufferMemoryBarrier.Builder`
  `setSrcQueueFamilyIndex(VulkanQueueFamilyIndex srcQueueFamilyIndex)`
  Initializes the value for the `srcQueueFamilyIndex` attribute.
  `final VulkanBufferMemoryBarrier.Builder`
  `setSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)`
  Sets or replaces all elements for `srcStageMask` set.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final VulkanBufferMemoryBarrier.Builder from(VulkanBufferMemoryBarrierType instance)
    Fill a builder with attribute values from the provided `VulkanBufferMemoryBarrierType` 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

  - ### addSrcStageMask

    public final VulkanBufferMemoryBarrier.Builder addSrcStageMask(VulkanPipelineStageFlag element)
    Adds one element to `srcStageMask` set.
    Parameters:
      `element` - A srcStageMask element
    Returns:
      `this` builder for use in a chained invocation

  - ### addSrcStageMask

    public final VulkanBufferMemoryBarrier.Builder addSrcStageMask(VulkanPipelineStageFlag... elements)
    Adds elements to `srcStageMask` set.
    Parameters:
      `elements` - An array of srcStageMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSrcStageMask

    public final VulkanBufferMemoryBarrier.Builder setSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)
    Sets or replaces all elements for `srcStageMask` set.
    Parameters:
      `elements` - An iterable of srcStageMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllSrcStageMask

    public final VulkanBufferMemoryBarrier.Builder addAllSrcStageMask(Iterable<VulkanPipelineStageFlag> elements)
    Adds elements to `srcStageMask` set.
    Parameters:
      `elements` - An iterable of srcStageMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addSrcAccessMask

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

  - ### addSrcAccessMask

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

  - ### setSrcAccessMask

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

  - ### addAllSrcAccessMask

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

  - ### addDstStageMask

    public final VulkanBufferMemoryBarrier.Builder addDstStageMask(VulkanPipelineStageFlag element)
    Adds one element to `dstStageMask` set.
    Parameters:
      `element` - A dstStageMask element
    Returns:
      `this` builder for use in a chained invocation

  - ### addDstStageMask

    public final VulkanBufferMemoryBarrier.Builder addDstStageMask(VulkanPipelineStageFlag... elements)
    Adds elements to `dstStageMask` set.
    Parameters:
      `elements` - An array of dstStageMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setDstStageMask

    public final VulkanBufferMemoryBarrier.Builder setDstStageMask(Iterable<VulkanPipelineStageFlag> elements)
    Sets or replaces all elements for `dstStageMask` set.
    Parameters:
      `elements` - An iterable of dstStageMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllDstStageMask

    public final VulkanBufferMemoryBarrier.Builder addAllDstStageMask(Iterable<VulkanPipelineStageFlag> elements)
    Adds elements to `dstStageMask` set.
    Parameters:
      `elements` - An iterable of dstStageMask elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addDstAccessMask

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

  - ### addDstAccessMask

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

  - ### setDstAccessMask

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

  - ### addAllDstAccessMask

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

  - ### setSrcQueueFamilyIndex

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

  - ### setDstQueueFamilyIndex

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

  - ### setBuffer

    public final VulkanBufferMemoryBarrier.Builder setBuffer(VulkanBufferType buffer)
    Initializes the value for the `buffer` attribute.
    Parameters:
      `buffer` - The value for buffer
    Returns:
      `this` builder for use in a chained invocation

  - ### setOffset

    public final VulkanBufferMemoryBarrier.Builder setOffset(long offset)
    Initializes the value for the `offset` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `offset`.

    Parameters:
      `offset` - The value for offset
    Returns:
      `this` builder for use in a chained invocation

  - ### setSize

    public final VulkanBufferMemoryBarrier.Builder setSize(long size)
    Initializes the value for the `size` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `size`.

    Parameters:
      `size` - The value for size
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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