# Class VulkanSpecializationMapEntry

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

All Implemented Interfaces:
  `VulkanSpecializationMapEntryType`

public final class VulkanSpecializationMapEntry extends Object implements VulkanSpecializationMapEntryType

See Also:
  - "VkSpecializationMapEntry"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanSpecializationMapEntry.Builder`
  `builder()`
  Creates a builder for `VulkanSpecializationMapEntry`.
  `int`
  `constantID()`
  `static VulkanSpecializationMapEntry`
  `copyOf(VulkanSpecializationMapEntryType instance)`
  Creates an immutable copy of a `VulkanSpecializationMapEntryType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanSpecializationMapEntry` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `constantID`, `offset`, `size`.
  `long`
  `offset()`
  `long`
  `size()`
  `String`
  `toString()`
  Prints the immutable value `VulkanSpecializationMapEntry` with attribute values.
  `final VulkanSpecializationMapEntry`
  `withConstantID(int value)`
  Copy the current immutable object by setting a value for the `constantID` attribute.
  `final VulkanSpecializationMapEntry`
  `withOffset(long value)`
  Copy the current immutable object by setting a value for the `offset` attribute.
  `final VulkanSpecializationMapEntry`
  `withSize(long value)`
  Copy the current immutable object by setting a value for the `size` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### constantID

    public int constantID()
    Specified by:
      `constantID` in interface `VulkanSpecializationMapEntryType`
    Returns:
      The ID of the specialization constant in SPIR-V.

  - ### offset

    public long offset()
    Specified by:
      `offset` in interface `VulkanSpecializationMapEntryType`
    Returns:
      The byte offset of the specialization constant value within the supplied data buffer.

  - ### size

    public long size()
    Specified by:
      `size` in interface `VulkanSpecializationMapEntryType`
    Returns:
      The byte size of the specialization constant value within the supplied data buffer.

  - ### withConstantID

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

  - ### withOffset

    public final VulkanSpecializationMapEntry withOffset(long 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 or the `this` object

  - ### withSize

    public final VulkanSpecializationMapEntry 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 or the `this` object

  - ### equals

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

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

        VulkanSpecializationMapEntry.builder()
           .setConstantID(int) // optional constantID
           .setOffset(long) // optional offset
           .setSize(long) // optional size
           .build();

    Returns:
      A new VulkanSpecializationMapEntry builder