# Class VulkanBufferCreateInfo.Builder

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

Enclosing class:
  `VulkanBufferCreateInfo`

public static final class VulkanBufferCreateInfo.Builder extends Object
Builds instances of type `VulkanBufferCreateInfo`. 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 VulkanBufferCreateInfo.Builder`
  `addAllFlags(Iterable<VulkanBufferCreateFlag> elements)`
  Adds elements to `flags` set.
  `final VulkanBufferCreateInfo.Builder`
  `addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)`
  Adds elements to `queueFamilyIndices` list.
  `final VulkanBufferCreateInfo.Builder`
  `addAllUsageFlags(Iterable<VulkanBufferUsageFlag> elements)`
  Adds elements to `usageFlags` set.
  `final VulkanBufferCreateInfo.Builder`
  `addFlags(VulkanBufferCreateFlag element)`
  Adds one element to `flags` set.
  `final VulkanBufferCreateInfo.Builder`
  `addFlags(VulkanBufferCreateFlag... elements)`
  Adds elements to `flags` set.
  `final VulkanBufferCreateInfo.Builder`
  `addQueueFamilyIndices(VulkanQueueFamilyIndex element)`
  Adds one element to `queueFamilyIndices` list.
  `final VulkanBufferCreateInfo.Builder`
  `addQueueFamilyIndices(VulkanQueueFamilyIndex... elements)`
  Adds elements to `queueFamilyIndices` list.
  `final VulkanBufferCreateInfo.Builder`
  `addUsageFlags(VulkanBufferUsageFlag element)`
  Adds one element to `usageFlags` set.
  `final VulkanBufferCreateInfo.Builder`
  `addUsageFlags(VulkanBufferUsageFlag... elements)`
  Adds elements to `usageFlags` set.
  `VulkanBufferCreateInfo`
  `build()`
  Builds a new `VulkanBufferCreateInfo`.
  `final VulkanBufferCreateInfo.Builder`
  `from(VulkanBufferCreateInfoType instance)`
  Fill a builder with attribute values from the provided `VulkanBufferCreateInfoType` instance.
  `final VulkanBufferCreateInfo.Builder`
  `setFlags(Iterable<VulkanBufferCreateFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VulkanBufferCreateInfo.Builder`
  `setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)`
  Sets or replaces all elements for `queueFamilyIndices` list.
  `final VulkanBufferCreateInfo.Builder`
  `setSharingMode(VulkanSharingMode sharingMode)`
  Initializes the value for the `sharingMode` attribute.
  `final VulkanBufferCreateInfo.Builder`
  `setSize(long size)`
  Initializes the value for the `size` attribute.
  `final VulkanBufferCreateInfo.Builder`
  `setUsageFlags(Iterable<VulkanBufferUsageFlag> elements)`
  Sets or replaces all elements for `usageFlags` set.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

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

  - ### addFlags

    public final VulkanBufferCreateInfo.Builder addFlags(VulkanBufferCreateFlag element)
    Adds one element to `flags` set.
    Parameters:
      `element` - A flags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addFlags

    public final VulkanBufferCreateInfo.Builder addFlags(VulkanBufferCreateFlag... elements)
    Adds elements to `flags` set.
    Parameters:
      `elements` - An array of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setFlags

    public final VulkanBufferCreateInfo.Builder setFlags(Iterable<VulkanBufferCreateFlag> elements)
    Sets or replaces all elements for `flags` set.
    Parameters:
      `elements` - An iterable of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllFlags

    public final VulkanBufferCreateInfo.Builder addAllFlags(Iterable<VulkanBufferCreateFlag> elements)
    Adds elements to `flags` set.
    Parameters:
      `elements` - An iterable of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSize

    public final VulkanBufferCreateInfo.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

  - ### addUsageFlags

    public final VulkanBufferCreateInfo.Builder addUsageFlags(VulkanBufferUsageFlag element)
    Adds one element to `usageFlags` set.
    Parameters:
      `element` - A usageFlags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addUsageFlags

    public final VulkanBufferCreateInfo.Builder addUsageFlags(VulkanBufferUsageFlag... elements)
    Adds elements to `usageFlags` set.
    Parameters:
      `elements` - An array of usageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setUsageFlags

    public final VulkanBufferCreateInfo.Builder setUsageFlags(Iterable<VulkanBufferUsageFlag> elements)
    Sets or replaces all elements for `usageFlags` set.
    Parameters:
      `elements` - An iterable of usageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllUsageFlags

    public final VulkanBufferCreateInfo.Builder addAllUsageFlags(Iterable<VulkanBufferUsageFlag> elements)
    Adds elements to `usageFlags` set.
    Parameters:
      `elements` - An iterable of usageFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSharingMode

    public final VulkanBufferCreateInfo.Builder setSharingMode(VulkanSharingMode sharingMode)
    Initializes the value for the `sharingMode` attribute.

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

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

  - ### addQueueFamilyIndices

    public final VulkanBufferCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex element)
    Adds one element to `queueFamilyIndices` list.
    Parameters:
      `element` - A queueFamilyIndices element
    Returns:
      `this` builder for use in a chained invocation

  - ### addQueueFamilyIndices

    public final VulkanBufferCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex... elements)
    Adds elements to `queueFamilyIndices` list.
    Parameters:
      `elements` - An array of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setQueueFamilyIndices

    public final VulkanBufferCreateInfo.Builder setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)
    Sets or replaces all elements for `queueFamilyIndices` list.
    Parameters:
      `elements` - An iterable of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllQueueFamilyIndices

    public final VulkanBufferCreateInfo.Builder addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements)
    Adds elements to `queueFamilyIndices` list.
    Parameters:
      `elements` - An iterable of queueFamilyIndices elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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