Class VulkanBufferCopy

java.lang.Object
com.io7m.jcoronado.api.VulkanBufferCopy
All Implemented Interfaces:
VulkanBufferCopyType

public final class VulkanBufferCopy extends Object implements VulkanBufferCopyType
Structure specifying a buffer copy operation.
See Also:
  • "VkBufferCopy"
  • Method Details

    • sourceOffset

      public long sourceOffset()
      Specified by:
      sourceOffset in interface VulkanBufferCopyType
      Returns:
      The starting offset in bytes from the start of the source buffer.
    • targetOffset

      public long targetOffset()
      Specified by:
      targetOffset in interface VulkanBufferCopyType
      Returns:
      The starting offset in bytes from the start of the target buffer.
    • size

      public long size()
      Specified by:
      size in interface VulkanBufferCopyType
      Returns:
      The number of bytes to copy.
    • withSourceOffset

      public final VulkanBufferCopy withSourceOffset(long value)
      Copy the current immutable object by setting a value for the sourceOffset attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sourceOffset
      Returns:
      A modified copy of the this object
    • withTargetOffset

      public final VulkanBufferCopy withTargetOffset(long value)
      Copy the current immutable object by setting a value for the targetOffset attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetOffset
      Returns:
      A modified copy of the this object
    • withSize

      public final VulkanBufferCopy withSize(long value)
      Copy the current immutable object by setting a value for the size attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for size
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanBufferCopy 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: sourceOffset, targetOffset, size.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanBufferCopy of(long sourceOffset, long targetOffset, long size)
      Construct a new immutable VulkanBufferCopy instance.
      Parameters:
      sourceOffset - The value for the sourceOffset attribute
      targetOffset - The value for the targetOffset attribute
      size - The value for the size attribute
      Returns:
      An immutable VulkanBufferCopy instance
    • copyOf

      public static VulkanBufferCopy copyOf(VulkanBufferCopyType instance)
      Creates an immutable copy of a VulkanBufferCopyType 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 VulkanBufferCopy instance
    • builder

      public static VulkanBufferCopy.Builder builder()
      Creates a builder for VulkanBufferCopy.
       VulkanBufferCopy.builder()
          .setSourceOffset(long) // required sourceOffset
          .setTargetOffset(long) // required targetOffset
          .setSize(long) // required size
          .build();
       
      Returns:
      A new VulkanBufferCopy builder