# Class VulkanSpecializationMap

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

All Implemented Interfaces:
  `VulkanSpecializationMapType`

public final class VulkanSpecializationMap extends Object implements VulkanSpecializationMapType

See Also:
  - "VkSpecializationMap"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanSpecializationMap.Builder`
  `builder()`
  Creates a builder for `VulkanSpecializationMap`.
  `static VulkanSpecializationMap`
  `copyOf(VulkanSpecializationMapType instance)`
  Creates an immutable copy of a `VulkanSpecializationMapType` value.
  `ByteBuffer`
  `data()`
  `List<VulkanSpecializationMapEntry>`
  `entries()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanSpecializationMap` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `entries`, `data`.
  `static VulkanSpecializationMap`
  `of(Iterable<? extends VulkanSpecializationMapEntry> entries, ByteBuffer data)`
  Construct a new immutable `VulkanSpecializationMap` instance.
  `static VulkanSpecializationMap`
  `of(List<VulkanSpecializationMapEntry> entries, ByteBuffer data)`
  Construct a new immutable `VulkanSpecializationMap` instance.
  `String`
  `toString()`
  Prints the immutable value `VulkanSpecializationMap` with attribute values.
  `final VulkanSpecializationMap`
  `withData(ByteBuffer value)`
  Copy the current immutable object by setting a value for the `data` attribute.
  `final VulkanSpecializationMap`
  `withEntries(VulkanSpecializationMapEntry... elements)`
  Copy the current immutable object with elements that replace the content of `entries`.
  `final VulkanSpecializationMap`
  `withEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)`
  Copy the current immutable object with elements that replace the content of `entries`.

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

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

  ### Methods inherited from interface com.io7m.jcoronado.api.VulkanSpecializationMapType

  `checkPreconditions`

- ## Method Details

  - ### entries

    public List<VulkanSpecializationMapEntry> entries()
    Specified by:
      `entries` in interface `VulkanSpecializationMapType`
    Returns:
      A list of entries mapping constants to offsets in `data`

  - ### data

    public ByteBuffer data()
    Specified by:
      `data` in interface `VulkanSpecializationMapType`
    Returns:
      The constant data

  - ### withEntries

    public final VulkanSpecializationMap withEntries(VulkanSpecializationMapEntry... elements)
    Copy the current immutable object with elements that replace the content of `entries`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withEntries

    public final VulkanSpecializationMap withEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)
    Copy the current immutable object with elements that replace the content of `entries`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of entries elements to set
    Returns:
      A modified copy of `this` object

  - ### withData

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

  - ### equals

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

  - ### toString

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

  - ### of

    public static VulkanSpecializationMap of(List<VulkanSpecializationMapEntry> entries, ByteBuffer data)
    Construct a new immutable `VulkanSpecializationMap` instance.
    Parameters:
      `entries` - The value for the `entries` attribute
      `data` - The value for the `data` attribute
    Returns:
      An immutable VulkanSpecializationMap instance

  - ### of

    public static VulkanSpecializationMap of(Iterable<? extends VulkanSpecializationMapEntry> entries, ByteBuffer data)
    Construct a new immutable `VulkanSpecializationMap` instance.
    Parameters:
      `entries` - The value for the `entries` attribute
      `data` - The value for the `data` attribute
    Returns:
      An immutable VulkanSpecializationMap instance

  - ### copyOf

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

  - ### builder

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

         VulkanSpecializationMap.builder()
            .addEntries|addAllEntries(VulkanSpecializationMapEntry) // entries elements
            .setData(java.nio.ByteBuffer) // required data
            .build();

    Returns:
      A new VulkanSpecializationMap builder