# Class VMAAllocatorCreateInfo.Builder

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

Enclosing class:
  `VMAAllocatorCreateInfo`

public static final class VMAAllocatorCreateInfo.Builder extends Object
Builds instances of type `VMAAllocatorCreateInfo`. 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 VMAAllocatorCreateInfo.Builder`
  `addAllFlags(Iterable<VMAAllocatorCreateFlag> elements)`
  Adds elements to `flags` set.
  `final VMAAllocatorCreateInfo.Builder`
  `addFlags(VMAAllocatorCreateFlag element)`
  Adds one element to `flags` set.
  `final VMAAllocatorCreateInfo.Builder`
  `addFlags(VMAAllocatorCreateFlag... elements)`
  Adds elements to `flags` set.
  `VMAAllocatorCreateInfo`
  `build()`
  Builds a new `VMAAllocatorCreateInfo`.
  `final VMAAllocatorCreateInfo.Builder`
  `from(VMAAllocatorCreateInfoType instance)`
  Fill a builder with attribute values from the provided `VMAAllocatorCreateInfoType` instance.
  `final VMAAllocatorCreateInfo.Builder`
  `setFlags(Iterable<VMAAllocatorCreateFlag> elements)`
  Sets or replaces all elements for `flags` set.
  `final VMAAllocatorCreateInfo.Builder`
  `setFrameInUseCount(int frameInUseCount)`
  Initializes the optional value `frameInUseCount` to frameInUseCount.
  `final VMAAllocatorCreateInfo.Builder`
  `setFrameInUseCount(OptionalInt frameInUseCount)`
  Initializes the optional value `frameInUseCount` to frameInUseCount.
  `final VMAAllocatorCreateInfo.Builder`
  `setLogicalDevice(VulkanLogicalDeviceType logicalDevice)`
  Initializes the value for the `logicalDevice` attribute.
  `final VMAAllocatorCreateInfo.Builder`
  `setPreferredLargeHeapBlockSize(long preferredLargeHeapBlockSize)`
  Initializes the optional value `preferredLargeHeapBlockSize` to preferredLargeHeapBlockSize.
  `final VMAAllocatorCreateInfo.Builder`
  `setPreferredLargeHeapBlockSize(OptionalLong preferredLargeHeapBlockSize)`
  Initializes the optional value `preferredLargeHeapBlockSize` to preferredLargeHeapBlockSize.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

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

  - ### addFlags

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

  - ### setLogicalDevice

    public final VMAAllocatorCreateInfo.Builder setLogicalDevice(VulkanLogicalDeviceType logicalDevice)
    Initializes the value for the `logicalDevice` attribute.
    Parameters:
      `logicalDevice` - The value for logicalDevice
    Returns:
      `this` builder for use in a chained invocation

  - ### setPreferredLargeHeapBlockSize

    public final VMAAllocatorCreateInfo.Builder setPreferredLargeHeapBlockSize(long preferredLargeHeapBlockSize)
    Initializes the optional value `preferredLargeHeapBlockSize` to preferredLargeHeapBlockSize.
    Parameters:
      `preferredLargeHeapBlockSize` - The value for preferredLargeHeapBlockSize
    Returns:
      `this` builder for chained invocation

  - ### setPreferredLargeHeapBlockSize

    public final VMAAllocatorCreateInfo.Builder setPreferredLargeHeapBlockSize(OptionalLong preferredLargeHeapBlockSize)
    Initializes the optional value `preferredLargeHeapBlockSize` to preferredLargeHeapBlockSize.
    Parameters:
      `preferredLargeHeapBlockSize` - The value for preferredLargeHeapBlockSize
    Returns:
      `this` builder for use in a chained invocation

  - ### setFrameInUseCount

    public final VMAAllocatorCreateInfo.Builder setFrameInUseCount(int frameInUseCount)
    Initializes the optional value `frameInUseCount` to frameInUseCount.
    Parameters:
      `frameInUseCount` - The value for frameInUseCount
    Returns:
      `this` builder for chained invocation

  - ### setFrameInUseCount

    public final VMAAllocatorCreateInfo.Builder setFrameInUseCount(OptionalInt frameInUseCount)
    Initializes the optional value `frameInUseCount` to frameInUseCount.
    Parameters:
      `frameInUseCount` - The value for frameInUseCount
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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