Class VulkanMappedMemoryRange
java.lang.Object
com.io7m.jcoronado.api.VulkanMappedMemoryRange
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanMappedMemoryRange. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanMappedMemoryRange.static VulkanMappedMemoryRangecopyOf(VulkanMappedMemoryRangeType instance) Creates an immutable copy of aVulkanMappedMemoryRangeTypevalue.booleanThis instance is equal to all instances ofVulkanMappedMemoryRangethat have equal attribute values.inthashCode()Computes a hash code from attributes:memory,offset,size.memory()static VulkanMappedMemoryRangeof(VulkanDeviceMemoryType memory, long offset, long size) Construct a new immutableVulkanMappedMemoryRangeinstance.longoffset()longsize()toString()Prints the immutable valueVulkanMappedMemoryRangewith attribute values.final VulkanMappedMemoryRangewithMemory(VulkanDeviceMemoryType value) Copy the current immutable object by setting a value for thememoryattribute.final VulkanMappedMemoryRangewithOffset(long value) Copy the current immutable object by setting a value for theoffsetattribute.final VulkanMappedMemoryRangewithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.
-
Method Details
-
memory
- Specified by:
memoryin interfaceVulkanMappedMemoryRangeType- Returns:
- The memory object to which this range belongs.
-
offset
public long offset()- Specified by:
offsetin interfaceVulkanMappedMemoryRangeType- Returns:
- The zero-based byte offset from the beginning of the memory object.
-
size
public long size()- Specified by:
sizein interfaceVulkanMappedMemoryRangeType- Returns:
- Either the size of range, or VK_WHOLE_SIZE to affect the range from offset to the end of the current mapping of the allocation.
-
withMemory
Copy the current immutable object by setting a value for thememoryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for memory- Returns:
- A modified copy of the
thisobject
-
withOffset
Copy the current immutable object by setting a value for theoffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for offset- Returns:
- A modified copy of the
thisobject
-
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
-
equals
-
hashCode
-
toString
-
of
Construct a new immutableVulkanMappedMemoryRangeinstance.- Parameters:
memory- The value for thememoryattributeoffset- The value for theoffsetattributesize- The value for thesizeattribute- Returns:
- An immutable VulkanMappedMemoryRange instance
-
copyOf
Creates an immutable copy of aVulkanMappedMemoryRangeTypevalue. 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 VulkanMappedMemoryRange instance
-
builder
Creates a builder forVulkanMappedMemoryRange.VulkanMappedMemoryRange.builder() .setMemory(com.io7m.jcoronado.api.VulkanDeviceMemoryType) // requiredmemory.setOffset(long) // requiredoffset.setSize(long) // requiredsize.build();- Returns:
- A new VulkanMappedMemoryRange builder
-