Class VulkanBufferCopy

  • All Implemented Interfaces:
    VulkanBufferCopyType

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

      • 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​(java.lang.Object another)
        This instance is equal to all instances of VulkanBufferCopy that have equal attribute values.
        Overrides:
        equals in class java.lang.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 java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value VulkanBufferCopy with attribute values.
        Overrides:
        toString in class java.lang.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