# 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
  `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`
  `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 java.lang.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.
    Parameters:
      `instance` - The instance from which to copy values
    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