# Class VulkanBufferImageCopy

java.lang.Object
com.io7m.jcoronado.api.VulkanBufferImageCopy

All Implemented Interfaces:
  `VulkanBufferImageCopyType`

public final class VulkanBufferImageCopy extends Object implements VulkanBufferImageCopyType
Structure specifying a buffer ↔ image copy operation.

See Also:
  - "VkBufferImageCopy"

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VulkanBufferImageCopy.Builder`
  Builds instances of type `VulkanBufferImageCopy`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `bufferImageHeight()`
  `long`
  `bufferOffset()`
  `int`
  `bufferRowLength()`
  The bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations.
  `static VulkanBufferImageCopy.Builder`
  `builder()`
  Creates a builder for `VulkanBufferImageCopy`.
  `static VulkanBufferImageCopy`
  `copyOf(VulkanBufferImageCopyType instance)`
  Creates an immutable copy of a `VulkanBufferImageCopyType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanBufferImageCopy` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `bufferOffset`, `bufferRowLength`, `bufferImageHeight`, `imageSubresource`, `imageOffset`, `imageExtent`.
  `VulkanExtent3D`
  `imageExtent()`
  `VulkanOffset3D`
  `imageOffset()`
  `VulkanImageSubresourceLayers`
  `imageSubresource()`
  `static VulkanBufferImageCopy`
  `of(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent)`
  Construct a new immutable `VulkanBufferImageCopy` instance.
  `String`
  `toString()`
  Prints the immutable value `VulkanBufferImageCopy` with attribute values.
  `final VulkanBufferImageCopy`
  `withBufferImageHeight(int value)`
  Copy the current immutable object by setting a value for the `bufferImageHeight` attribute.
  `final VulkanBufferImageCopy`
  `withBufferOffset(long value)`
  Copy the current immutable object by setting a value for the `bufferOffset` attribute.
  `final VulkanBufferImageCopy`
  `withBufferRowLength(int value)`
  Copy the current immutable object by setting a value for the `bufferRowLength` attribute.
  `final VulkanBufferImageCopy`
  `withImageExtent(VulkanExtent3D value)`
  Copy the current immutable object by setting a value for the `imageExtent` attribute.
  `final VulkanBufferImageCopy`
  `withImageOffset(VulkanOffset3D value)`
  Copy the current immutable object by setting a value for the `imageOffset` attribute.
  `final VulkanBufferImageCopy`
  `withImageSubresource(VulkanImageSubresourceLayers value)`
  Copy the current immutable object by setting a value for the `imageSubresource` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### bufferOffset

    public long bufferOffset()
    Specified by:
      `bufferOffset` in interface `VulkanBufferImageCopyType`
    Returns:
      The offset in bytes from the start of the buffer object where the image data is copied from or to.

  - ### bufferRowLength

    public int bufferRowLength()
    The bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent.
    Specified by:
      `bufferRowLength` in interface `VulkanBufferImageCopyType`
    Returns:
      The buffer row length

  - ### bufferImageHeight

    public int bufferImageHeight()
    Specified by:
      `bufferImageHeight` in interface `VulkanBufferImageCopyType`
    Returns:
      The buffer image height

  - ### imageSubresource

    public VulkanImageSubresourceLayers imageSubresource()
    Specified by:
      `imageSubresource` in interface `VulkanBufferImageCopyType`
    Returns:
      An image specifying the specific image subresources of the image used for the source or destination image data.

  - ### imageOffset

    public VulkanOffset3D imageOffset()
    Specified by:
      `imageOffset` in interface `VulkanBufferImageCopyType`
    Returns:
      The initial x, y, z offsets in texels of the sub-region of the source or destination image data.

  - ### imageExtent

    public VulkanExtent3D imageExtent()
    Specified by:
      `imageExtent` in interface `VulkanBufferImageCopyType`
    Returns:
      The size in texels of the image to copy in width, height and depth.

  - ### withBufferOffset

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

  - ### withBufferRowLength

    public final VulkanBufferImageCopy withBufferRowLength(int value)
    Copy the current immutable object by setting a value for the `bufferRowLength` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for bufferRowLength
    Returns:
      A modified copy of the `this` object

  - ### withBufferImageHeight

    public final VulkanBufferImageCopy withBufferImageHeight(int value)
    Copy the current immutable object by setting a value for the `bufferImageHeight` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for bufferImageHeight
    Returns:
      A modified copy of the `this` object

  - ### withImageSubresource

    public final VulkanBufferImageCopy withImageSubresource(VulkanImageSubresourceLayers value)
    Copy the current immutable object by setting a value for the `imageSubresource` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for imageSubresource
    Returns:
      A modified copy of the `this` object

  - ### withImageOffset

    public final VulkanBufferImageCopy withImageOffset(VulkanOffset3D value)
    Copy the current immutable object by setting a value for the `imageOffset` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for imageOffset
    Returns:
      A modified copy of the `this` object

  - ### withImageExtent

    public final VulkanBufferImageCopy withImageExtent(VulkanExtent3D value)
    Copy the current immutable object by setting a value for the `imageExtent` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for imageExtent
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanBufferImageCopy` 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: `bufferOffset`, `bufferRowLength`, `bufferImageHeight`, `imageSubresource`, `imageOffset`, `imageExtent`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static VulkanBufferImageCopy of(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent)
    Construct a new immutable `VulkanBufferImageCopy` instance.
    Parameters:
      `bufferOffset` - The value for the `bufferOffset` attribute
      `bufferRowLength` - The value for the `bufferRowLength` attribute
      `bufferImageHeight` - The value for the `bufferImageHeight` attribute
      `imageSubresource` - The value for the `imageSubresource` attribute
      `imageOffset` - The value for the `imageOffset` attribute
      `imageExtent` - The value for the `imageExtent` attribute
    Returns:
      An immutable VulkanBufferImageCopy instance

  - ### copyOf

    public static VulkanBufferImageCopy copyOf(VulkanBufferImageCopyType instance)
    Creates an immutable copy of a `VulkanBufferImageCopyType` 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 VulkanBufferImageCopy instance

  - ### builder

    public static VulkanBufferImageCopy.Builder builder()
    Creates a builder for `VulkanBufferImageCopy`.

         VulkanBufferImageCopy.builder()
            .setBufferOffset(long) // required bufferOffset
            .setBufferRowLength(int) // required bufferRowLength
            .setBufferImageHeight(int) // required bufferImageHeight
            .setImageSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // required imageSubresource
            .setImageOffset(com.io7m.jcoronado.api.VulkanOffset3D) // required imageOffset
            .setImageExtent(com.io7m.jcoronado.api.VulkanExtent3D) // required imageExtent
            .build();

    Returns:
      A new VulkanBufferImageCopy builder