Module com.io7m.jcoronado.api
Package com.io7m.jcoronado.api
Class VulkanHostAllocatorCallbacks.Builder
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanHostAllocatorCallbacks.Builder
-
- Enclosing class:
- VulkanHostAllocatorCallbacks
public static final class VulkanHostAllocatorCallbacks.Builder extends java.lang.Object
Builds instances of typeVulkanHostAllocatorCallbacks
. Initialize attributes and then invoke thebuild()
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
-
-
-
Method Detail
-
from
public final VulkanHostAllocatorCallbacks.Builder from(VulkanHostAllocatorCallbacksType instance)
Fill a builder with attribute values from the providedVulkanHostAllocatorCallbacksType
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 theallocation
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 thedeallocation
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 thereallocation
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 theonInternalAllocation
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 theonInternalDeallocation
attribute.- Parameters:
onInternalDeallocation
- The value for onInternalDeallocation- Returns:
this
builder for use in a chained invocation
-
build
public VulkanHostAllocatorCallbacks build()
Builds a newVulkanHostAllocatorCallbacks
.- Returns:
- An immutable instance of VulkanHostAllocatorCallbacks
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-