# Class VulkanSpecializationMap.Builder

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

Enclosing class:
  `VulkanSpecializationMap`

public static final class VulkanSpecializationMap.Builder extends Object
Builds instances of type `VulkanSpecializationMap`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

`Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final VulkanSpecializationMap.Builder`
  `addAllEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)`
  Adds elements to `entries` list.
  `final VulkanSpecializationMap.Builder`
  `addEntries(VulkanSpecializationMapEntry element)`
  Adds one element to `entries` list.
  `final VulkanSpecializationMap.Builder`
  `addEntries(VulkanSpecializationMapEntry... elements)`
  Adds elements to `entries` list.
  `VulkanSpecializationMap`
  `build()`
  Builds a new `VulkanSpecializationMap`.
  `final VulkanSpecializationMap.Builder`
  `from(VulkanSpecializationMapType instance)`
  Fill a builder with attribute values from the provided `VulkanSpecializationMapType` instance.
  `final VulkanSpecializationMap.Builder`
  `setData(ByteBuffer data)`
  Initializes the value for the `data` attribute.
  `final VulkanSpecializationMap.Builder`
  `setEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)`
  Sets or replaces all elements for `entries` list.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final VulkanSpecializationMap.Builder from(VulkanSpecializationMapType instance)
    Fill a builder with attribute values from the provided `VulkanSpecializationMapType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### addEntries

    public final VulkanSpecializationMap.Builder addEntries(VulkanSpecializationMapEntry element)
    Adds one element to `entries` list.
    Parameters:
      `element` - A entries element
    Returns:
      `this` builder for use in a chained invocation

  - ### addEntries

    public final VulkanSpecializationMap.Builder addEntries(VulkanSpecializationMapEntry... elements)
    Adds elements to `entries` list.
    Parameters:
      `elements` - An array of entries elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setEntries

    public final VulkanSpecializationMap.Builder setEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)
    Sets or replaces all elements for `entries` list.
    Parameters:
      `elements` - An iterable of entries elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllEntries

    public final VulkanSpecializationMap.Builder addAllEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)
    Adds elements to `entries` list.
    Parameters:
      `elements` - An iterable of entries elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setData

    public final VulkanSpecializationMap.Builder setData(ByteBuffer data)
    Initializes the value for the `data` attribute.
    Parameters:
      `data` - The value for data
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public VulkanSpecializationMap build()
    Builds a new `VulkanSpecializationMap`.
    Returns:
      An immutable instance of VulkanSpecializationMap
    Throws:
      `IllegalStateException` - if any required attributes are missing