# Class VulkanVertexInputAttributeDescription

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

All Implemented Interfaces:
  `VulkanVertexInputAttributeDescriptionType`

public final class VulkanVertexInputAttributeDescription extends Object implements VulkanVertexInputAttributeDescriptionType
Structure specifying vertex input attribute description.

See Also:
  - "VkVertexInputAttributeDescription"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `binding()`
  `static VulkanVertexInputAttributeDescription.Builder`
  `builder()`
  Creates a builder for `VulkanVertexInputAttributeDescription`.
  `static VulkanVertexInputAttributeDescription`
  `copyOf(VulkanVertexInputAttributeDescriptionType instance)`
  Creates an immutable copy of a `VulkanVertexInputAttributeDescriptionType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanVertexInputAttributeDescription` that have equal attribute values.
  `VulkanFormat`
  `format()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `location`, `binding`, `format`, `offset`.
  `int`
  `location()`
  `static VulkanVertexInputAttributeDescription`
  `of(int location, int binding, VulkanFormat format, int offset)`
  Construct a new immutable `VulkanVertexInputAttributeDescription` instance.
  `int`
  `offset()`
  `String`
  `toString()`
  Prints the immutable value `VulkanVertexInputAttributeDescription` with attribute values.
  `final VulkanVertexInputAttributeDescription`
  `withBinding(int value)`
  Copy the current immutable object by setting a value for the `binding` attribute.
  `final VulkanVertexInputAttributeDescription`
  `withFormat(VulkanFormat value)`
  Copy the current immutable object by setting a value for the `format` attribute.
  `final VulkanVertexInputAttributeDescription`
  `withLocation(int value)`
  Copy the current immutable object by setting a value for the `location` attribute.
  `final VulkanVertexInputAttributeDescription`
  `withOffset(int value)`
  Copy the current immutable object by setting a value for the `offset` attribute.

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

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

- ## Method Details

  - ### location

    public int location()
    Specified by:
      `location` in interface `VulkanVertexInputAttributeDescriptionType`
    Returns:
      The shader binding location number for this attribute.

  - ### binding

    public int binding()
    Specified by:
      `binding` in interface `VulkanVertexInputAttributeDescriptionType`
    Returns:
      The binding number which this attribute takes its data from.

  - ### format

    public VulkanFormat format()
    Specified by:
      `format` in interface `VulkanVertexInputAttributeDescriptionType`
    Returns:
      The the size and type of the vertex attribute data.

  - ### offset

    public int offset()
    Specified by:
      `offset` in interface `VulkanVertexInputAttributeDescriptionType`
    Returns:
      a byte offset of this attribute relative to the start of an element in the vertex input binding.

  - ### withLocation

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

  - ### withBinding

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

  - ### withFormat

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

  - ### withOffset

    public final VulkanVertexInputAttributeDescription withOffset(int 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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanVertexInputAttributeDescription` 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: `location`, `binding`, `format`, `offset`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static VulkanVertexInputAttributeDescription of(int location, int binding, VulkanFormat format, int offset)
    Construct a new immutable `VulkanVertexInputAttributeDescription` instance.
    Parameters:
      `location` - The value for the `location` attribute
      `binding` - The value for the `binding` attribute
      `format` - The value for the `format` attribute
      `offset` - The value for the `offset` attribute
    Returns:
      An immutable VulkanVertexInputAttributeDescription instance

  - ### copyOf

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

  - ### builder

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

         VulkanVertexInputAttributeDescription.builder()
            .setLocation(int) // required location
            .setBinding(int) // required binding
            .setFormat(com.io7m.jcoronado.api.VulkanFormat) // required format
            .setOffset(int) // required offset
            .build();

    Returns:
      A new VulkanVertexInputAttributeDescription builder