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
Modifier and TypeClassDescriptionstatic final class
Builds 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 VulkanHostAllocatorCallbacks
copyOf
(VulkanHostAllocatorCallbacksType instance) Creates an immutable copy of aVulkanHostAllocatorCallbacksType
value.boolean
This instance is equal to all instances ofVulkanHostAllocatorCallbacks
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 immutableVulkanHostAllocatorCallbacks
instance.toString()
Prints the immutable valueVulkanHostAllocatorCallbacks
with attribute values.Copy the current immutable object by setting a value for theallocation
attribute.Copy the current immutable object by setting a value for thedeallocation
attribute.Copy the current immutable object by setting a value for theonInternalAllocation
attribute.Copy the current immutable object by setting a value for theonInternalDeallocation
attribute.Copy the current immutable object by setting a value for thereallocation
attribute.
-
Method Details
-
allocation
- Specified by:
allocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The allocation function
-
deallocation
- Specified by:
deallocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The deallocation function
-
reallocation
- Specified by:
reallocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The reallocation function
-
onInternalAllocation
- Specified by:
onInternalAllocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The internal allocation notification function
-
onInternalDeallocation
- Specified by:
onInternalDeallocation
in 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 theallocation
attribute. 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
this
object
-
withDeallocation
public final VulkanHostAllocatorCallbacks withDeallocation(VulkanHostAllocatorCallbacksType.DeallocationFunctionType value) Copy the current immutable object by setting a value for thedeallocation
attribute. 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
this
object
-
withReallocation
public final VulkanHostAllocatorCallbacks withReallocation(VulkanHostAllocatorCallbacksType.ReallocationFunctionType value) Copy the current immutable object by setting a value for thereallocation
attribute. 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
this
object
-
withOnInternalAllocation
public final VulkanHostAllocatorCallbacks withOnInternalAllocation(VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType value) Copy the current immutable object by setting a value for theonInternalAllocation
attribute. 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
this
object
-
withOnInternalDeallocation
public final VulkanHostAllocatorCallbacks withOnInternalDeallocation(VulkanHostAllocatorCallbacksType.InternalFreeNotificationType value) Copy the current immutable object by setting a value for theonInternalDeallocation
attribute. 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
this
object
-
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 immutableVulkanHostAllocatorCallbacks
instance.- Parameters:
allocation
- The value for theallocation
attributedeallocation
- The value for thedeallocation
attributereallocation
- The value for thereallocation
attributeonInternalAllocation
- The value for theonInternalAllocation
attributeonInternalDeallocation
- The value for theonInternalDeallocation
attribute- Returns:
- An immutable VulkanHostAllocatorCallbacks instance
-
copyOf
Creates an immutable copy of aVulkanHostAllocatorCallbacksType
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
Creates a builder forVulkanHostAllocatorCallbacks
.VulkanHostAllocatorCallbacks.builder() .setAllocation(com.io7m.jcoronado.api.VulkanHostAllocatorCallbacksType.AllocationFunctionType) // required
allocation
.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
-