- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanDescriptorBufferInfo
-
- All Implemented Interfaces:
VulkanDescriptorBufferInfoType
public final class VulkanDescriptorBufferInfo extends java.lang.Object implements VulkanDescriptorBufferInfoType
- See Also:
- "VkDescriptorBufferInfo"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanDescriptorBufferInfo.Builder
Builds instances of typeVulkanDescriptorBufferInfo
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VulkanBufferType
buffer()
static VulkanDescriptorBufferInfo.Builder
builder()
Creates a builder forVulkanDescriptorBufferInfo
.static VulkanDescriptorBufferInfo
copyOf(VulkanDescriptorBufferInfoType instance)
Creates an immutable copy of aVulkanDescriptorBufferInfoType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanDescriptorBufferInfo
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:buffer
,offset
,range
.static VulkanDescriptorBufferInfo
of(VulkanBufferType buffer, long offset, long range)
Construct a new immutableVulkanDescriptorBufferInfo
instance.long
offset()
long
range()
java.lang.String
toString()
Prints the immutable valueVulkanDescriptorBufferInfo
with attribute values.VulkanDescriptorBufferInfo
withBuffer(VulkanBufferType value)
Copy the current immutable object by setting a value for thebuffer
attribute.VulkanDescriptorBufferInfo
withOffset(long value)
Copy the current immutable object by setting a value for theoffset
attribute.VulkanDescriptorBufferInfo
withRange(long value)
Copy the current immutable object by setting a value for therange
attribute.
-
-
-
Method Detail
-
buffer
public VulkanBufferType buffer()
- Specified by:
buffer
in interfaceVulkanDescriptorBufferInfoType
- Returns:
- The buffer resource
-
offset
public long offset()
- Specified by:
offset
in interfaceVulkanDescriptorBufferInfoType
- Returns:
- The offset in bytes from the start of buffer. Access to buffer memory via this descriptor uses addressing that is relative to this starting offset.
-
range
public long range()
- Specified by:
range
in interfaceVulkanDescriptorBufferInfoType
- Returns:
- The size in bytes that is used for this descriptor update, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.
-
withBuffer
public final VulkanDescriptorBufferInfo withBuffer(VulkanBufferType value)
Copy the current immutable object by setting a value for thebuffer
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for buffer- Returns:
- A modified copy of the
this
object
-
withOffset
public final VulkanDescriptorBufferInfo withOffset(long value)
Copy the current immutable object by setting a value for theoffset
attribute. 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
this
object
-
withRange
public final VulkanDescriptorBufferInfo withRange(long value)
Copy the current immutable object by setting a value for therange
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for range- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanDescriptorBufferInfo
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:buffer
,offset
,range
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanDescriptorBufferInfo
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanDescriptorBufferInfo of(VulkanBufferType buffer, long offset, long range)
Construct a new immutableVulkanDescriptorBufferInfo
instance.- Parameters:
buffer
- The value for thebuffer
attributeoffset
- The value for theoffset
attributerange
- The value for therange
attribute- Returns:
- An immutable VulkanDescriptorBufferInfo instance
-
copyOf
public static VulkanDescriptorBufferInfo copyOf(VulkanDescriptorBufferInfoType instance)
Creates an immutable copy of aVulkanDescriptorBufferInfoType
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 VulkanDescriptorBufferInfo instance
-
builder
public static VulkanDescriptorBufferInfo.Builder builder()
Creates a builder forVulkanDescriptorBufferInfo
.- Returns:
- A new VulkanDescriptorBufferInfo builder
-
-