- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanHostAllocatorCallbacks
-
- All Implemented Interfaces:
VulkanHostAllocatorCallbacksType
public final class VulkanHostAllocatorCallbacks extends java.lang.Object implements VulkanHostAllocatorCallbacksType
Vulkan host allocation functions.- See Also:
- "VkAllocationCallbacks"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanHostAllocatorCallbacks.Builder
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
-
-
-
Method Detail
-
allocation
public VulkanHostAllocatorCallbacksType.AllocationFunctionType allocation()
- Specified by:
allocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The allocation function
-
deallocation
public VulkanHostAllocatorCallbacksType.DeallocationFunctionType deallocation()
- Specified by:
deallocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The deallocation function
-
reallocation
public VulkanHostAllocatorCallbacksType.ReallocationFunctionType reallocation()
- Specified by:
reallocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The reallocation function
-
onInternalAllocation
public VulkanHostAllocatorCallbacksType.InternalAllocationNotificationType onInternalAllocation()
- Specified by:
onInternalAllocation
in interfaceVulkanHostAllocatorCallbacksType
- Returns:
- The internal allocation notification function
-
onInternalDeallocation
public VulkanHostAllocatorCallbacksType.InternalFreeNotificationType 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
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanHostAllocatorCallbacks
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:allocation
,deallocation
,reallocation
,onInternalAllocation
,onInternalDeallocation
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanHostAllocatorCallbacks
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
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
public static VulkanHostAllocatorCallbacks copyOf(VulkanHostAllocatorCallbacksType instance)
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
public static VulkanHostAllocatorCallbacks.Builder builder()
Creates a builder forVulkanHostAllocatorCallbacks
.- Returns:
- A new VulkanHostAllocatorCallbacks builder
-
-