# Class VulkanHostAllocatorCallbacks.Builder

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

Enclosing class:
  `VulkanHostAllocatorCallbacks`

public static final class VulkanHostAllocatorCallbacks.Builder extends Object
Builds instances of type `VulkanHostAllocatorCallbacks`. 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
  `VulkanHostAllocatorCallbacks`
  `build()`
  Builds a new `VulkanHostAllocatorCallbacks`.
  `final VulkanHostAllocatorCallbacks.Builder`
  `from(VulkanHostAllocatorCallbacksType instance)`
  Fill a builder with attribute values from the provided `VulkanHostAllocatorCallbacksType` instance.
  `final VulkanHostAllocatorCallbacks.Builder`
  `setAllocation(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation)`
  Initializes the value for the `allocation` attribute.
  `final VulkanHostAllocatorCallbacks.Builder`
  `setDeallocation(VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation)`
  Initializes the value for the `deallocation` attribute.
  `final VulkanHostAllocatorCallbacks.Builder`
  `setOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation)`
  Initializes the value for the `onInternalAllocation` attribute.
  `final VulkanHostAllocatorCallbacks.Builder`
  `setOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation)`
  Initializes the value for the `onInternalDeallocation` attribute.
  `final VulkanHostAllocatorCallbacks.Builder`
  `setReallocation(VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation)`
  Initializes the value for the `reallocation` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final VulkanHostAllocatorCallbacks.Builder from(VulkanHostAllocatorCallbacksType instance)
    Fill a builder with attribute values from the provided `VulkanHostAllocatorCallbacksType` 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

  - ### setAllocation

    public final VulkanHostAllocatorCallbacks.Builder setAllocation(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation)
    Initializes the value for the `allocation` attribute.
    Parameters:
      `allocation` - The value for allocation
    Returns:
      `this` builder for use in a chained invocation

  - ### setDeallocation

    public final VulkanHostAllocatorCallbacks.Builder setDeallocation(VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation)
    Initializes the value for the `deallocation` attribute.
    Parameters:
      `deallocation` - The value for deallocation
    Returns:
      `this` builder for use in a chained invocation

  - ### setReallocation

    public final VulkanHostAllocatorCallbacks.Builder setReallocation(VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation)
    Initializes the value for the `reallocation` attribute.
    Parameters:
      `reallocation` - The value for reallocation
    Returns:
      `this` builder for use in a chained invocation

  - ### setOnInternalAllocation

    public final VulkanHostAllocatorCallbacks.Builder setOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation)
    Initializes the value for the `onInternalAllocation` attribute.
    Parameters:
      `onInternalAllocation` - The value for onInternalAllocation
    Returns:
      `this` builder for use in a chained invocation

  - ### setOnInternalDeallocation

    public final VulkanHostAllocatorCallbacks.Builder setOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation)
    Initializes the value for the `onInternalDeallocation` attribute.
    Parameters:
      `onInternalDeallocation` - The value for onInternalDeallocation
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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