Class VulkanHostAllocatorCallbacks.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanHostAllocatorCallbacks.Builder
- Enclosing class:
VulkanHostAllocatorCallbacks
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 TypeMethodDescriptionbuild()Builds a newVulkanHostAllocatorCallbacks.from(VulkanHostAllocatorCallbacksType instance) Fill a builder with attribute values from the providedVulkanHostAllocatorCallbacksTypeinstance.Initializes the value for theallocationattribute.Initializes the value for thedeallocationattribute.setOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation) Initializes the value for theonInternalAllocationattribute.setOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation) Initializes the value for theonInternalDeallocationattribute.Initializes the value for thereallocationattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanHostAllocatorCallbacksTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setAllocation
public final VulkanHostAllocatorCallbacks.Builder setAllocation(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation) Initializes the value for theallocationattribute.- Parameters:
allocation- The value for allocation- Returns:
thisbuilder for use in a chained invocation
-
setDeallocation
public final VulkanHostAllocatorCallbacks.Builder setDeallocation(VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation) Initializes the value for thedeallocationattribute.- Parameters:
deallocation- The value for deallocation- Returns:
thisbuilder for use in a chained invocation
-
setReallocation
public final VulkanHostAllocatorCallbacks.Builder setReallocation(VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation) Initializes the value for thereallocationattribute.- Parameters:
reallocation- The value for reallocation- Returns:
thisbuilder for use in a chained invocation
-
setOnInternalAllocation
public final VulkanHostAllocatorCallbacks.Builder setOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation) Initializes the value for theonInternalAllocationattribute.- Parameters:
onInternalAllocation- The value for onInternalAllocation- Returns:
thisbuilder for use in a chained invocation
-
setOnInternalDeallocation
public final VulkanHostAllocatorCallbacks.Builder setOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation) Initializes the value for theonInternalDeallocationattribute.- Parameters:
onInternalDeallocation- The value for onInternalDeallocation- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanHostAllocatorCallbacks.- Returns:
- An immutable instance of VulkanHostAllocatorCallbacks
- Throws:
IllegalStateException- if any required attributes are missing
-