# Class VulkanDescriptorPoolSize

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

All Implemented Interfaces:
  `VulkanDescriptorPoolSizeType`

public final class VulkanDescriptorPoolSize extends Object implements VulkanDescriptorPoolSizeType

See Also:
  - "VkDescriptorPoolSize"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanDescriptorPoolSize.Builder`
  `builder()`
  Creates a builder for `VulkanDescriptorPoolSize`.
  `static VulkanDescriptorPoolSize`
  `copyOf(VulkanDescriptorPoolSizeType instance)`
  Creates an immutable copy of a `VulkanDescriptorPoolSizeType` value.
  `int`
  `descriptorCount()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanDescriptorPoolSize` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `type`, `descriptorCount`.
  `static VulkanDescriptorPoolSize`
  `of(VulkanDescriptorType type, int descriptorCount)`
  Construct a new immutable `VulkanDescriptorPoolSize` instance.
  `String`
  `toString()`
  Prints the immutable value `VulkanDescriptorPoolSize` with attribute values.
  `VulkanDescriptorType`
  `type()`
  `final VulkanDescriptorPoolSize`
  `withDescriptorCount(int value)`
  Copy the current immutable object by setting a value for the `descriptorCount` attribute.
  `final VulkanDescriptorPoolSize`
  `withType(VulkanDescriptorType value)`
  Copy the current immutable object by setting a value for the `type` attribute.

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

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

- ## Method Details

  - ### type

    public VulkanDescriptorType type()
    Specified by:
      `type` in interface `VulkanDescriptorPoolSizeType`
    Returns:
      The type of descriptor.

  - ### descriptorCount

    public int descriptorCount()
    Specified by:
      `descriptorCount` in interface `VulkanDescriptorPoolSizeType`
    Returns:
      The number of descriptors of that type to allocate.

  - ### withType

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

  - ### withDescriptorCount

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

  - ### equals

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

  - ### toString

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

  - ### of

    public static VulkanDescriptorPoolSize of(VulkanDescriptorType type, int descriptorCount)
    Construct a new immutable `VulkanDescriptorPoolSize` instance.
    Parameters:
      `type` - The value for the `type` attribute
      `descriptorCount` - The value for the `descriptorCount` attribute
    Returns:
      An immutable VulkanDescriptorPoolSize instance

  - ### copyOf

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

  - ### builder

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

         VulkanDescriptorPoolSize.builder()
            .setType(com.io7m.jcoronado.api.VulkanDescriptorType) // required type
            .setDescriptorCount(int) // required descriptorCount
            .build();

    Returns:
      A new VulkanDescriptorPoolSize builder