Class VulkanDescriptorBufferInfo

java.lang.Object
com.io7m.jcoronado.api.VulkanDescriptorBufferInfo
All Implemented Interfaces:
VulkanDescriptorBufferInfoType

public final class VulkanDescriptorBufferInfo extends Object implements VulkanDescriptorBufferInfoType
See Also:
  • "VkDescriptorBufferInfo"
  • Method Details

    • buffer

      public VulkanBufferType buffer()
      Specified by:
      buffer in interface VulkanDescriptorBufferInfoType
      Returns:
      The buffer resource
    • offset

      public long offset()
      Specified by:
      offset in interface VulkanDescriptorBufferInfoType
      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 interface VulkanDescriptorBufferInfoType
      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 the buffer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      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 the offset attribute. A value equality check is used to prevent copying of the same value by returning this.
      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 the range attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for range
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanDescriptorBufferInfo that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: buffer, offset, range.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanDescriptorBufferInfo with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static VulkanDescriptorBufferInfo of(VulkanBufferType buffer, long offset, long range)
      Construct a new immutable VulkanDescriptorBufferInfo instance.
      Parameters:
      buffer - The value for the buffer attribute
      offset - The value for the offset attribute
      range - The value for the range attribute
      Returns:
      An immutable VulkanDescriptorBufferInfo instance
    • copyOf

      Creates an immutable copy of a VulkanDescriptorBufferInfoType 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 for VulkanDescriptorBufferInfo.
       VulkanDescriptorBufferInfo.builder()
          .setBuffer(com.io7m.jcoronado.api.VulkanBufferType) // required buffer
          .setOffset(long) // required offset
          .setRange(long) // required range
          .build();
       
      Returns:
      A new VulkanDescriptorBufferInfo builder