- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanMemoryAllocateInfo
-
- All Implemented Interfaces:
VulkanMemoryAllocateInfoType
public final class VulkanMemoryAllocateInfo extends java.lang.Object implements VulkanMemoryAllocateInfoType
- See Also:
- "VkMemoryAllocateInfo"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanMemoryAllocateInfo.Builder
Builds instances of typeVulkanMemoryAllocateInfo
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanMemoryAllocateInfo.Builder
builder()
Creates a builder forVulkanMemoryAllocateInfo
.static VulkanMemoryAllocateInfo
copyOf(VulkanMemoryAllocateInfoType instance)
Creates an immutable copy of aVulkanMemoryAllocateInfoType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanMemoryAllocateInfo
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:size
,memoryTypeIndex
.int
memoryTypeIndex()
static VulkanMemoryAllocateInfo
of(long size, int memoryTypeIndex)
Construct a new immutableVulkanMemoryAllocateInfo
instance.long
size()
java.lang.String
toString()
Prints the immutable valueVulkanMemoryAllocateInfo
with attribute values.VulkanMemoryAllocateInfo
withMemoryTypeIndex(int value)
Copy the current immutable object by setting a value for thememoryTypeIndex
attribute.VulkanMemoryAllocateInfo
withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute.
-
-
-
Method Detail
-
size
public long size()
- Specified by:
size
in interfaceVulkanMemoryAllocateInfoType
- Returns:
- The size of the allocation in bytes
-
memoryTypeIndex
public int memoryTypeIndex()
- Specified by:
memoryTypeIndex
in interfaceVulkanMemoryAllocateInfoType
- Returns:
- An index identifying a memory type from the memoryTypes array of the VkPhysicalDeviceMemoryProperties structure
-
withSize
public final VulkanMemoryAllocateInfo withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for size- Returns:
- A modified copy of the
this
object
-
withMemoryTypeIndex
public final VulkanMemoryAllocateInfo withMemoryTypeIndex(int value)
Copy the current immutable object by setting a value for thememoryTypeIndex
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for memoryTypeIndex- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanMemoryAllocateInfo
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:size
,memoryTypeIndex
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanMemoryAllocateInfo
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanMemoryAllocateInfo of(long size, int memoryTypeIndex)
Construct a new immutableVulkanMemoryAllocateInfo
instance.- Parameters:
size
- The value for thesize
attributememoryTypeIndex
- The value for thememoryTypeIndex
attribute- Returns:
- An immutable VulkanMemoryAllocateInfo instance
-
copyOf
public static VulkanMemoryAllocateInfo copyOf(VulkanMemoryAllocateInfoType instance)
Creates an immutable copy of aVulkanMemoryAllocateInfoType
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 VulkanMemoryAllocateInfo instance
-
builder
public static VulkanMemoryAllocateInfo.Builder builder()
Creates a builder forVulkanMemoryAllocateInfo
.- Returns:
- A new VulkanMemoryAllocateInfo builder
-
-