# Class VulkanHostAllocatorCallbacks

java.lang.Object
com.io7m.jcoronado.api.VulkanHostAllocatorCallbacks

All Implemented Interfaces:
  `VulkanHostAllocatorCallbacksType`

public final class VulkanHostAllocatorCallbacks extends Object implements VulkanHostAllocatorCallbacksType
Vulkan host allocation functions.

See Also:
  - "VkAllocationCallbacks"

- ## Nested Class Summary

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

  ### Nested classes/interfaces inherited from interface com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType

  `VulkanHostAllocatorCallbacksType.AllocationFunctionType, VulkanHostAllocatorCallbacksType.DeallocationFunctionType, VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType, VulkanHostAllocatorCallbacksType.InternalFreeNotificationType, VulkanHostAllocatorCallbacksType.ReallocationFunctionType`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VulkanHostAllocatorCallbacksType.AllocationFunctionType`
  `allocation()`
  `static VulkanHostAllocatorCallbacks.Builder`
  `builder()`
  Creates a builder for `VulkanHostAllocatorCallbacks`.
  `static VulkanHostAllocatorCallbacks`
  `copyOf(VulkanHostAllocatorCallbacksType instance)`
  Creates an immutable copy of a `VulkanHostAllocatorCallbacksType` value.
  `VulkanHostAllocatorCallbacksType.DeallocationFunctionType`
  `deallocation()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanHostAllocatorCallbacks` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `allocation`, `deallocation`, `reallocation`, `onInternalAllocation`, `onInternalDeallocation`.
  `static VulkanHostAllocatorCallbacks`
  `of(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation, VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation, VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation, VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation, VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation)`
  Construct a new immutable `VulkanHostAllocatorCallbacks` instance.
  `VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType`
  `onInternalAllocation()`
  `VulkanHostAllocatorCallbacksType.InternalFreeNotificationType`
  `onInternalDeallocation()`
  `VulkanHostAllocatorCallbacksType.ReallocationFunctionType`
  `reallocation()`
  `String`
  `toString()`
  Prints the immutable value `VulkanHostAllocatorCallbacks` with attribute values.
  `final VulkanHostAllocatorCallbacks`
  `withAllocation(VulkanHostAllocatorCallbacksType.AllocationFunctionType value)`
  Copy the current immutable object by setting a value for the `allocation` attribute.
  `final VulkanHostAllocatorCallbacks`
  `withDeallocation(VulkanHostAllocatorCallbacksType.DeallocationFunctionType value)`
  Copy the current immutable object by setting a value for the `deallocation` attribute.
  `final VulkanHostAllocatorCallbacks`
  `withOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType value)`
  Copy the current immutable object by setting a value for the `onInternalAllocation` attribute.
  `final VulkanHostAllocatorCallbacks`
  `withOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType value)`
  Copy the current immutable object by setting a value for the `onInternalDeallocation` attribute.
  `final VulkanHostAllocatorCallbacks`
  `withReallocation(VulkanHostAllocatorCallbacksType.ReallocationFunctionType value)`
  Copy the current immutable object by setting a value for the `reallocation` attribute.

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

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

- ## Method Details

  - ### allocation

    public VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation()
    Specified by:
      `allocation` in interface `VulkanHostAllocatorCallbacksType`
    Returns:
      The allocation function

  - ### deallocation

    public VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation()
    Specified by:
      `deallocation` in interface `VulkanHostAllocatorCallbacksType`
    Returns:
      The deallocation function

  - ### reallocation

    public VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation()
    Specified by:
      `reallocation` in interface `VulkanHostAllocatorCallbacksType`
    Returns:
      The reallocation function

  - ### onInternalAllocation

    public VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation()
    Specified by:
      `onInternalAllocation` in interface `VulkanHostAllocatorCallbacksType`
    Returns:
      The internal allocation notification function

  - ### onInternalDeallocation

    public VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation()
    Specified by:
      `onInternalDeallocation` in interface `VulkanHostAllocatorCallbacksType`
    Returns:
      The internal deallocation notification function

  - ### withAllocation

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

  - ### withDeallocation

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

  - ### withReallocation

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

  - ### withOnInternalAllocation

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

  - ### withOnInternalDeallocation

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanHostAllocatorCallbacks` 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: `allocation`, `deallocation`, `reallocation`, `onInternalAllocation`, `onInternalDeallocation`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static VulkanHostAllocatorCallbacks of(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation, VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation, VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation, VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation, VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation)
    Construct a new immutable `VulkanHostAllocatorCallbacks` instance.
    Parameters:
      `allocation` - The value for the `allocation` attribute
      `deallocation` - The value for the `deallocation` attribute
      `reallocation` - The value for the `reallocation` attribute
      `onInternalAllocation` - The value for the `onInternalAllocation` attribute
      `onInternalDeallocation` - The value for the `onInternalDeallocation` attribute
    Returns:
      An immutable VulkanHostAllocatorCallbacks instance

  - ### copyOf

    public static VulkanHostAllocatorCallbacks copyOf(VulkanHostAllocatorCallbacksType instance)
    Creates an immutable copy of a `VulkanHostAllocatorCallbacksType` 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 VulkanHostAllocatorCallbacks instance

  - ### builder

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

         VulkanHostAllocatorCallbacks.builder()
            .setAllocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.AllocationFunctionType) // required allocation
            .setDeallocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.DeallocationFunctionType) // required deallocation
            .setReallocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.ReallocationFunctionType) // required reallocation
            .setOnInternalAllocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType) // required onInternalAllocation
            .setOnInternalDeallocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.InternalFreeNotificationType) // required onInternalDeallocation
            .build();

    Returns:
      A new VulkanHostAllocatorCallbacks builder