# Class VulkanImageFormatProperties.Builder

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

Enclosing class:
  `VulkanImageFormatProperties`

public static final class VulkanImageFormatProperties.Builder extends Object
Builds instances of type `VulkanImageFormatProperties`. 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 VulkanImageFormatProperties.Builder`
  `addAllSampleCounts(Iterable<VulkanSampleCountFlag> elements)`
  Adds elements to `sampleCounts` set.
  `final VulkanImageFormatProperties.Builder`
  `addSampleCounts(VulkanSampleCountFlag element)`
  Adds one element to `sampleCounts` set.
  `final VulkanImageFormatProperties.Builder`
  `addSampleCounts(VulkanSampleCountFlag... elements)`
  Adds elements to `sampleCounts` set.
  `VulkanImageFormatProperties`
  `build()`
  Builds a new `VulkanImageFormatProperties`.
  `final VulkanImageFormatProperties.Builder`
  `from(VulkanImageFormatPropertiesType instance)`
  Fill a builder with attribute values from the provided `VulkanImageFormatPropertiesType` instance.
  `final VulkanImageFormatProperties.Builder`
  `setMaxArrayLayers(int maxArrayLayers)`
  Initializes the value for the `maxArrayLayers` attribute.
  `final VulkanImageFormatProperties.Builder`
  `setMaxExtent(VulkanExtent3D maxExtent)`
  Initializes the value for the `maxExtent` attribute.
  `final VulkanImageFormatProperties.Builder`
  `setMaxMipLevels(int maxMipLevels)`
  Initializes the value for the `maxMipLevels` attribute.
  `final VulkanImageFormatProperties.Builder`
  `setMaxResourceSize(long maxResourceSize)`
  Initializes the value for the `maxResourceSize` attribute.
  `final VulkanImageFormatProperties.Builder`
  `setSampleCounts(Iterable<VulkanSampleCountFlag> elements)`
  Sets or replaces all elements for `sampleCounts` set.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final VulkanImageFormatProperties.Builder from(VulkanImageFormatPropertiesType instance)
    Fill a builder with attribute values from the provided `VulkanImageFormatPropertiesType` 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

  - ### setMaxExtent

    public final VulkanImageFormatProperties.Builder setMaxExtent(VulkanExtent3D maxExtent)
    Initializes the value for the `maxExtent` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `maxExtent`.

    Parameters:
      `maxExtent` - The value for maxExtent
    Returns:
      `this` builder for use in a chained invocation

  - ### setMaxMipLevels

    public final VulkanImageFormatProperties.Builder setMaxMipLevels(int maxMipLevels)
    Initializes the value for the `maxMipLevels` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `maxMipLevels`.

    Parameters:
      `maxMipLevels` - The value for maxMipLevels
    Returns:
      `this` builder for use in a chained invocation

  - ### setMaxArrayLayers

    public final VulkanImageFormatProperties.Builder setMaxArrayLayers(int maxArrayLayers)
    Initializes the value for the `maxArrayLayers` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `maxArrayLayers`.

    Parameters:
      `maxArrayLayers` - The value for maxArrayLayers
    Returns:
      `this` builder for use in a chained invocation

  - ### addSampleCounts

    public final VulkanImageFormatProperties.Builder addSampleCounts(VulkanSampleCountFlag element)
    Adds one element to `sampleCounts` set.
    Parameters:
      `element` - A sampleCounts element
    Returns:
      `this` builder for use in a chained invocation

  - ### addSampleCounts

    public final VulkanImageFormatProperties.Builder addSampleCounts(VulkanSampleCountFlag... elements)
    Adds elements to `sampleCounts` set.
    Parameters:
      `elements` - An array of sampleCounts elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSampleCounts

    public final VulkanImageFormatProperties.Builder setSampleCounts(Iterable<VulkanSampleCountFlag> elements)
    Sets or replaces all elements for `sampleCounts` set.
    Parameters:
      `elements` - An iterable of sampleCounts elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllSampleCounts

    public final VulkanImageFormatProperties.Builder addAllSampleCounts(Iterable<VulkanSampleCountFlag> elements)
    Adds elements to `sampleCounts` set.
    Parameters:
      `elements` - An iterable of sampleCounts elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setMaxResourceSize

    public final VulkanImageFormatProperties.Builder setMaxResourceSize(long maxResourceSize)
    Initializes the value for the `maxResourceSize` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `maxResourceSize`.

    Parameters:
      `maxResourceSize` - The value for maxResourceSize
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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