# Class VMAAllocationCreateInfo.Builder

java.lang.Object
com.io7m.jcoronado.vma.VMAAllocationCreateInfo.Builder

Enclosing class:
  `VMAAllocationCreateInfo`

public static final class VMAAllocationCreateInfo.Builder extends Object
Builds instances of type `VMAAllocationCreateInfo`. 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 VMAAllocationCreateInfo.Builder`
  `addAllFlags(Iterable<VMAAllocationCreateFlag> elements)`
  Adds elements to `flags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addAllPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements)`
  Adds elements to `preferredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addAllRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements)`
  Adds elements to `requiredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addFlags(VMAAllocationCreateFlag element)`
  Adds one element to `flags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addFlags(VMAAllocationCreateFlag... elements)`
  Adds elements to `flags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addPreferredFlags(VulkanMemoryPropertyFlag element)`
  Adds one element to `preferredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addPreferredFlags(VulkanMemoryPropertyFlag... elements)`
  Adds elements to `preferredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addRequiredFlags(VulkanMemoryPropertyFlag element)`
  Adds one element to `requiredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `addRequiredFlags(VulkanMemoryPropertyFlag... elements)`
  Adds elements to `requiredFlags` set.
  `VMAAllocationCreateInfo`
  `build()`
  Builds a new `VMAAllocationCreateInfo`.
  `final VMAAllocationCreateInfo.Builder`
  `from(VMAAllocationCreateInfoType instance)`
  Fill a builder with attribute values from the provided `VMAAllocationCreateInfoType` instance.
  `final VMAAllocationCreateInfo.Builder`
  `setFlags(Iterable<VMAAllocationCreateFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VMAAllocationCreateInfo.Builder`
  `setMemoryTypeBits(long memoryTypeBits)`
  Initializes the value for the `memoryTypeBits` attribute.
  `final VMAAllocationCreateInfo.Builder`
  `setPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements)`
  Sets or replaces all elements for `preferredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `setRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements)`
  Sets or replaces all elements for `requiredFlags` set.
  `final VMAAllocationCreateInfo.Builder`
  `setUsage(VMAMemoryUsage usage)`
  Initializes the value for the `usage` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final VMAAllocationCreateInfo.Builder from(VMAAllocationCreateInfoType instance)
    Fill a builder with attribute values from the provided `VMAAllocationCreateInfoType` 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 VMAAllocationCreateInfo.Builder addFlags(VMAAllocationCreateFlag element)
    Adds one element to `flags` set.
    Parameters:
      `element` - A flags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addFlags

    public final VMAAllocationCreateInfo.Builder addFlags(VMAAllocationCreateFlag... 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 VMAAllocationCreateInfo.Builder setFlags(Iterable<VMAAllocationCreateFlag> 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 VMAAllocationCreateInfo.Builder addAllFlags(Iterable<VMAAllocationCreateFlag> elements)
    Adds elements to `flags` set.
    Parameters:
      `elements` - An iterable of flags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setUsage

    public final VMAAllocationCreateInfo.Builder setUsage(VMAMemoryUsage usage)
    Initializes the value for the `usage` attribute.
    Parameters:
      `usage` - The value for usage
    Returns:
      `this` builder for use in a chained invocation

  - ### addRequiredFlags

    public final VMAAllocationCreateInfo.Builder addRequiredFlags(VulkanMemoryPropertyFlag element)
    Adds one element to `requiredFlags` set.
    Parameters:
      `element` - A requiredFlags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addRequiredFlags

    public final VMAAllocationCreateInfo.Builder addRequiredFlags(VulkanMemoryPropertyFlag... elements)
    Adds elements to `requiredFlags` set.
    Parameters:
      `elements` - An array of requiredFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setRequiredFlags

    public final VMAAllocationCreateInfo.Builder setRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements)
    Sets or replaces all elements for `requiredFlags` set.
    Parameters:
      `elements` - An iterable of requiredFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllRequiredFlags

    public final VMAAllocationCreateInfo.Builder addAllRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements)
    Adds elements to `requiredFlags` set.
    Parameters:
      `elements` - An iterable of requiredFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addPreferredFlags

    public final VMAAllocationCreateInfo.Builder addPreferredFlags(VulkanMemoryPropertyFlag element)
    Adds one element to `preferredFlags` set.
    Parameters:
      `element` - A preferredFlags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addPreferredFlags

    public final VMAAllocationCreateInfo.Builder addPreferredFlags(VulkanMemoryPropertyFlag... elements)
    Adds elements to `preferredFlags` set.
    Parameters:
      `elements` - An array of preferredFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setPreferredFlags

    public final VMAAllocationCreateInfo.Builder setPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements)
    Sets or replaces all elements for `preferredFlags` set.
    Parameters:
      `elements` - An iterable of preferredFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllPreferredFlags

    public final VMAAllocationCreateInfo.Builder addAllPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements)
    Adds elements to `preferredFlags` set.
    Parameters:
      `elements` - An iterable of preferredFlags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setMemoryTypeBits

    public final VMAAllocationCreateInfo.Builder setMemoryTypeBits(long memoryTypeBits)
    Initializes the value for the `memoryTypeBits` attribute.
    Parameters:
      `memoryTypeBits` - The value for memoryTypeBits
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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