# 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.
  `Set<VMAAllocatorCreateFlag>`
  `flags()`
  `OptionalInt`
  `frameInUseCount()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `flags`, `logicalDevice`, `preferredLargeHeapBlockSize`, `frameInUseCount`.
  `VulkanLogicalDeviceType`
  `logicalDevice()`
  `OptionalLong`
  `preferredLargeHeapBlockSize()`
  `String`
  `toString()`
  Prints the immutable value `VMAAllocatorCreateInfo` with attribute values.
  `final VMAAllocatorCreateInfo`
  `withFlags(VMAAllocatorCreateFlag... elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VMAAllocatorCreateInfo`
  `withFlags(Iterable<VMAAllocatorCreateFlag> elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `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 Object

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

- ## Method Details

  - ### flags

    public Set<VMAAllocatorCreateFlag> flags()
    Specified by:
      `flags` in interface `VMAAllocatorCreateInfoType`
    Returns:
      The allocator flags

  - ### 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"

  - ### withFlags

    public final VMAAllocatorCreateInfo withFlags(VMAAllocatorCreateFlag... elements)
    Copy the current immutable object with elements that replace the content of `flags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withFlags

    public final VMAAllocatorCreateInfo withFlags(Iterable<VMAAllocatorCreateFlag> elements)
    Copy the current immutable object with elements that replace the content of `flags`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of flags elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### 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 or 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 or `this` if not changed

  - ### 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 value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - An optional value for preferredLargeHeapBlockSize
    Returns:
      A modified copy or `this` if not changed

  - ### 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 or `this` if not changed

  - ### 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 value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - An optional value for frameInUseCount
    Returns:
      A modified copy or `this` if not changed

  - ### 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: `flags`, `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()
           .addFlags|addAllFlags(com.io7m.jcoronado.vma.VMAAllocatorCreateFlag) // flags elements
           .setLogicalDevice(com.io7m.jcoronado.api.VulkanLogicalDeviceType) // required logicalDevice
           .setPreferredLargeHeapBlockSize(OptionalLong) // optional preferredLargeHeapBlockSize
           .setFrameInUseCount(OptionalInt) // optional frameInUseCount
           .build();

    Returns:
      A new VMAAllocatorCreateInfo builder