# Class VMAAllocatorCreateInfo

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

All Implemented Interfaces:
  `VMAAllocatorCreateInfoType`

public final class VMAAllocatorCreateInfo extends Object implements VMAAllocatorCreateInfoType
Information required to create an allocator.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VMAAllocatorCreateInfo.Builder`
  Builds instances of type `VMAAllocatorCreateInfo`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VMAAllocatorCreateInfo.Builder`
  `builder()`
  Creates a builder for `VMAAllocatorCreateInfo`.
  `static VMAAllocatorCreateInfo`
  `copyOf(VMAAllocatorCreateInfoType instance)`
  Creates an immutable copy of a `VMAAllocatorCreateInfoType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VMAAllocatorCreateInfo` that have equal attribute values.
  `OptionalInt`
  `frameInUseCount()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `logicalDevice`, `preferredLargeHeapBlockSize`, `frameInUseCount`.
  `VulkanLogicalDeviceType`
  `logicalDevice()`
  `OptionalLong`
  `preferredLargeHeapBlockSize()`
  `String`
  `toString()`
  Prints the immutable value `VMAAllocatorCreateInfo` with attribute values.
  `final VMAAllocatorCreateInfo`
  `withFrameInUseCount(int value)`
  Copy the current immutable object by setting a present value for the optional `frameInUseCount` attribute.
  `final VMAAllocatorCreateInfo`
  `withFrameInUseCount(OptionalInt optional)`
  Copy the current immutable object by setting an optional value for the `frameInUseCount` attribute.
  `final VMAAllocatorCreateInfo`
  `withLogicalDevice(VulkanLogicalDeviceType value)`
  Copy the current immutable object by setting a value for the `logicalDevice` attribute.
  `final VMAAllocatorCreateInfo`
  `withPreferredLargeHeapBlockSize(long value)`
  Copy the current immutable object by setting a present value for the optional `preferredLargeHeapBlockSize` attribute.
  `final VMAAllocatorCreateInfo`
  `withPreferredLargeHeapBlockSize(OptionalLong optional)`
  Copy the current immutable object by setting an optional value for the `preferredLargeHeapBlockSize` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### logicalDevice

    public VulkanLogicalDeviceType logicalDevice()
    Specified by:
      `logicalDevice` in interface `VMAAllocatorCreateInfoType`
    Returns:
      The logical device used for allocations

  - ### preferredLargeHeapBlockSize

    public OptionalLong preferredLargeHeapBlockSize()
    Specified by:
      `preferredLargeHeapBlockSize` in interface `VMAAllocatorCreateInfoType`
    Returns:
      The preferred size of a single VkDeviceMemory block to be allocated from large heaps > 1 GiB.

  - ### frameInUseCount

    public OptionalInt frameInUseCount()
    Specified by:
      `frameInUseCount` in interface `VMAAllocatorCreateInfoType`
    Returns:
      The maximum number of additional frames that are in use at the same time as current frame.
    See Also:
      - "https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/struct_vma_allocator_create_info.html"

  - ### withLogicalDevice

    public final VMAAllocatorCreateInfo withLogicalDevice(VulkanLogicalDeviceType value)
    Copy the current immutable object by setting a value for the `logicalDevice` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for logicalDevice
    Returns:
      A modified copy of the `this` object

  - ### withPreferredLargeHeapBlockSize

    public final VMAAllocatorCreateInfo withPreferredLargeHeapBlockSize(long value)
    Copy the current immutable object by setting a present value for the optional `preferredLargeHeapBlockSize` attribute.
    Parameters:
      `value` - The value for preferredLargeHeapBlockSize
    Returns:
      A modified copy of `this` object

  - ### withPreferredLargeHeapBlockSize

    public final VMAAllocatorCreateInfo withPreferredLargeHeapBlockSize(OptionalLong optional)
    Copy the current immutable object by setting an optional value for the `preferredLargeHeapBlockSize` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for preferredLargeHeapBlockSize
    Returns:
      A modified copy of `this` object

  - ### withFrameInUseCount

    public final VMAAllocatorCreateInfo withFrameInUseCount(int value)
    Copy the current immutable object by setting a present value for the optional `frameInUseCount` attribute.
    Parameters:
      `value` - The value for frameInUseCount
    Returns:
      A modified copy of `this` object

  - ### withFrameInUseCount

    public final VMAAllocatorCreateInfo withFrameInUseCount(OptionalInt optional)
    Copy the current immutable object by setting an optional value for the `frameInUseCount` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for frameInUseCount
    Returns:
      A modified copy of `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VMAAllocatorCreateInfo` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `logicalDevice`, `preferredLargeHeapBlockSize`, `frameInUseCount`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `VMAAllocatorCreateInfo` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static VMAAllocatorCreateInfo copyOf(VMAAllocatorCreateInfoType instance)
    Creates an immutable copy of a `VMAAllocatorCreateInfoType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable VMAAllocatorCreateInfo instance

  - ### builder

    public static VMAAllocatorCreateInfo.Builder builder()
    Creates a builder for `VMAAllocatorCreateInfo`.

         VMAAllocatorCreateInfo.builder()
            .setLogicalDevice(com.io7m.jcoronado.api.VulkanLogicalDeviceType) // required logicalDevice
            .setPreferredLargeHeapBlockSize(long) // optional preferredLargeHeapBlockSize
            .setFrameInUseCount(int) // optional frameInUseCount
            .build();

    Returns:
      A new VMAAllocatorCreateInfo builder