# Class VulkanOffset3D

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

All Implemented Interfaces:
  `VulkanOffset3DType`

public final class VulkanOffset3D extends Object implements VulkanOffset3DType
Structure specifying a three-dimensional offset.

See Also:
  - "VkOffset3D"

- ## Nested Class Summary

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

- ## Field Summary

  ### Fields inherited from interface VulkanOffset3DType

  `ZERO`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanOffset3D.Builder`
  `builder()`
  Creates a builder for `VulkanOffset3D`.
  `static VulkanOffset3D`
  `copyOf(VulkanOffset3DType instance)`
  Creates an immutable copy of a `VulkanOffset3DType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanOffset3D` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `x`, `y`, `z`.
  `String`
  `toString()`
  Prints the immutable value `VulkanOffset3D` with attribute values.
  `final VulkanOffset3D`
  `withX(int value)`
  Copy the current immutable object by setting a value for the `x` attribute.
  `final VulkanOffset3D`
  `withY(int value)`
  Copy the current immutable object by setting a value for the `y` attribute.
  `final VulkanOffset3D`
  `withZ(int value)`
  Copy the current immutable object by setting a value for the `z` attribute.
  `int`
  `x()`
  `int`
  `y()`
  `int`
  `z()`

  ### Methods inherited from class Object

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

- ## Method Details

  - ### x

    public int x()
    Specified by:
      `x` in interface `VulkanOffset3DType`
    Returns:
      The x offset

  - ### y

    public int y()
    Specified by:
      `y` in interface `VulkanOffset3DType`
    Returns:
      The y offset

  - ### z

    public int z()
    Specified by:
      `z` in interface `VulkanOffset3DType`
    Returns:
      The z offset

  - ### withX

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

  - ### withY

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

  - ### withZ

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanOffset3D` 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: `x`, `y`, `z`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

        VulkanOffset3D.builder()
           .setX(int) // optional x
           .setY(int) // optional y
           .setZ(int) // optional z
           .build();

    Returns:
      A new VulkanOffset3D builder