Class VulkanMemoryRequirements
java.lang.Object
com.io7m.jcoronado.api.VulkanMemoryRequirements
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanMemoryRequirements. -
Method Summary
Modifier and TypeMethodDescriptionlongbuilder()Creates a builder forVulkanMemoryRequirements.static VulkanMemoryRequirementscopyOf(VulkanMemoryRequirementsType instance) Creates an immutable copy of aVulkanMemoryRequirementsTypevalue.booleanThis instance is equal to all instances ofVulkanMemoryRequirementsthat have equal attribute values.inthashCode()Computes a hash code from attributes:size,alignment,memoryTypeBits.intstatic VulkanMemoryRequirementsof(long size, long alignment, int memoryTypeBits) Construct a new immutableVulkanMemoryRequirementsinstance.longsize()toString()Prints the immutable valueVulkanMemoryRequirementswith attribute values.final VulkanMemoryRequirementswithAlignment(long value) Copy the current immutable object by setting a value for thealignmentattribute.final VulkanMemoryRequirementswithMemoryTypeBits(int value) Copy the current immutable object by setting a value for thememoryTypeBitsattribute.final VulkanMemoryRequirementswithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.
-
Method Details
-
size
public long size()- Specified by:
sizein interfaceVulkanMemoryRequirementsType- Returns:
- The size, in bytes, of the memory allocation required for the resource.
-
alignment
public long alignment()- Specified by:
alignmentin interfaceVulkanMemoryRequirementsType- Returns:
- The alignment, in bytes, of the offset within the allocation required for the resource.
-
memoryTypeBits
public int memoryTypeBits()- Specified by:
memoryTypeBitsin interfaceVulkanMemoryRequirementsType- Returns:
- A bitmask that contains one bit set for every supported memory type for the resource. Bit i is set if and only if the memory type i in the VkPhysicalDeviceMemoryProperties structure for the physical device is supported for the resource.
-
withSize
Copy the current immutable object by setting a value for thesizeattribute. 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
thisobject
-
withAlignment
Copy the current immutable object by setting a value for thealignmentattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for alignment- Returns:
- A modified copy of the
thisobject
-
withMemoryTypeBits
Copy the current immutable object by setting a value for thememoryTypeBitsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for memoryTypeBits- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
Construct a new immutableVulkanMemoryRequirementsinstance.- Parameters:
size- The value for thesizeattributealignment- The value for thealignmentattributememoryTypeBits- The value for thememoryTypeBitsattribute- Returns:
- An immutable VulkanMemoryRequirements instance
-
copyOf
Creates an immutable copy of aVulkanMemoryRequirementsTypevalue. 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 VulkanMemoryRequirements instance
-
builder
Creates a builder forVulkanMemoryRequirements.VulkanMemoryRequirements.builder() .setSize(long) // requiredsize.setAlignment(long) // requiredalignment.setMemoryTypeBits(int) // requiredmemoryTypeBits.build();- Returns:
- A new VulkanMemoryRequirements builder
-