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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanHostAllocatorCallbacks.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 TypeMethodDescriptionbuilder()Creates a builder forVulkanHostAllocatorCallbacks.static VulkanHostAllocatorCallbackscopyOf(VulkanHostAllocatorCallbacksType instance) Creates an immutable copy of aVulkanHostAllocatorCallbacksTypevalue.booleanThis instance is equal to all instances ofVulkanHostAllocatorCallbacksthat have equal attribute values.inthashCode()Computes a hash code from attributes:allocation,deallocation,reallocation,onInternalAllocation,onInternalDeallocation.static VulkanHostAllocatorCallbacksof(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation, VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation, VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation, VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation, VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation) Construct a new immutableVulkanHostAllocatorCallbacksinstance.toString()Prints the immutable valueVulkanHostAllocatorCallbackswith attribute values.Copy the current immutable object by setting a value for theallocationattribute.Copy the current immutable object by setting a value for thedeallocationattribute.Copy the current immutable object by setting a value for theonInternalAllocationattribute.Copy the current immutable object by setting a value for theonInternalDeallocationattribute.Copy the current immutable object by setting a value for thereallocationattribute.
-
Method Details
-
allocation
- Specified by:
allocationin interfaceVulkanHostAllocatorCallbacksType- Returns:
- The allocation function
-
deallocation
- Specified by:
deallocationin interfaceVulkanHostAllocatorCallbacksType- Returns:
- The deallocation function
-
reallocation
- Specified by:
reallocationin interfaceVulkanHostAllocatorCallbacksType- Returns:
- The reallocation function
-
onInternalAllocation
- Specified by:
onInternalAllocationin interfaceVulkanHostAllocatorCallbacksType- Returns:
- The internal allocation notification function
-
onInternalDeallocation
- Specified by:
onInternalDeallocationin interfaceVulkanHostAllocatorCallbacksType- Returns:
- The internal deallocation notification function
-
withAllocation
public final VulkanHostAllocatorCallbacks withAllocation(VulkanHostAllocatorCallbacksType.AllocationFunctionType value) Copy the current immutable object by setting a value for theallocationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for allocation- Returns:
- A modified copy of the
thisobject
-
withDeallocation
public final VulkanHostAllocatorCallbacks withDeallocation(VulkanHostAllocatorCallbacksType.DeallocationFunctionType value) Copy the current immutable object by setting a value for thedeallocationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deallocation- Returns:
- A modified copy of the
thisobject
-
withReallocation
public final VulkanHostAllocatorCallbacks withReallocation(VulkanHostAllocatorCallbacksType.ReallocationFunctionType value) Copy the current immutable object by setting a value for thereallocationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reallocation- Returns:
- A modified copy of the
thisobject
-
withOnInternalAllocation
public final VulkanHostAllocatorCallbacks withOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType value) Copy the current immutable object by setting a value for theonInternalAllocationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for onInternalAllocation- Returns:
- A modified copy of the
thisobject
-
withOnInternalDeallocation
public final VulkanHostAllocatorCallbacks withOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType value) Copy the current immutable object by setting a value for theonInternalDeallocationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for onInternalDeallocation- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanHostAllocatorCallbacks of(VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation, VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation, VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation, VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation, VulkanHostAllocatorCallbacksType.InternalFreeNotificationType onInternalDeallocation) Construct a new immutableVulkanHostAllocatorCallbacksinstance.- Parameters:
allocation- The value for theallocationattributedeallocation- The value for thedeallocationattributereallocation- The value for thereallocationattributeonInternalAllocation- The value for theonInternalAllocationattributeonInternalDeallocation- The value for theonInternalDeallocationattribute- Returns:
- An immutable VulkanHostAllocatorCallbacks instance
-
copyOf
Creates an immutable copy of aVulkanHostAllocatorCallbacksTypevalue. 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
Creates a builder forVulkanHostAllocatorCallbacks.VulkanHostAllocatorCallbacks.builder() .setAllocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.AllocationFunctionType) // requiredallocation.setDeallocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.DeallocationFunctionType) // requireddeallocation.setReallocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.ReallocationFunctionType) // requiredreallocation.setOnInternalAllocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType) // requiredonInternalAllocation.setOnInternalDeallocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.InternalFreeNotificationType) // requiredonInternalDeallocation.build();- Returns:
- A new VulkanHostAllocatorCallbacks builder
-