# Class VulkanSurfaceCapabilitiesKHR

java.lang.Object
com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceCapabilitiesKHR

All Implemented Interfaces:
  `VulkanSurfaceCapabilitiesKHRType`

public final class VulkanSurfaceCapabilitiesKHR extends Object implements VulkanSurfaceCapabilitiesKHRType

See Also:
  - "VkSurfaceCapabilitiesKHR"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanSurfaceCapabilitiesKHR.Builder`
  `builder()`
  Creates a builder for `VulkanSurfaceCapabilitiesKHR`.
  `static VulkanSurfaceCapabilitiesKHR`
  `copyOf(VulkanSurfaceCapabilitiesKHRType instance)`
  Creates an immutable copy of a `VulkanSurfaceCapabilitiesKHRType` value.
  `VulkanExtent2D`
  `currentExtent()`
  `Set<VulkanSurfaceTransformFlagKHR>`
  `currentTransform()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanSurfaceCapabilitiesKHR` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `minImageCount`, `maxImageCount`, `currentExtent`, `minImageExtent`, `maxImageExtent`, `maxImageArrayLayers`, `supportedTransforms`, `currentTransform`, `supportedCompositeAlpha`, `supportedUsageFlags`.
  `int`
  `maxImageArrayLayers()`
  `int`
  `maxImageCount()`
  `VulkanExtent2D`
  `maxImageExtent()`
  `int`
  `minImageCount()`
  `VulkanExtent2D`
  `minImageExtent()`
  `static VulkanSurfaceCapabilitiesKHR`
  `of(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Iterable<VulkanSurfaceTransformFlagKHR> supportedTransforms, Iterable<VulkanSurfaceTransformFlagKHR> currentTransform, Iterable<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Iterable<VulkanImageUsageFlag> supportedUsageFlags)`
  Construct a new immutable `VulkanSurfaceCapabilitiesKHR` instance.
  `static VulkanSurfaceCapabilitiesKHR`
  `of(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Set<VulkanSurfaceTransformFlagKHR> supportedTransforms, Set<VulkanSurfaceTransformFlagKHR> currentTransform, Set<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Set<VulkanImageUsageFlag> supportedUsageFlags)`
  Construct a new immutable `VulkanSurfaceCapabilitiesKHR` instance.
  `Set<VulkanCompositeAlphaFlagKHR>`
  `supportedCompositeAlpha()`
  `Set<VulkanSurfaceTransformFlagKHR>`
  `supportedTransforms()`
  `Set<VulkanImageUsageFlag>`
  `supportedUsageFlags()`
  `String`
  `toString()`
  Prints the immutable value `VulkanSurfaceCapabilitiesKHR` with attribute values.
  `final VulkanSurfaceCapabilitiesKHR`
  `withCurrentExtent(VulkanExtent2D value)`
  Copy the current immutable object by setting a value for the `currentExtent` attribute.
  `final VulkanSurfaceCapabilitiesKHR`
  `withCurrentTransform(VulkanSurfaceTransformFlagKHR... elements)`
  Copy the current immutable object with elements that replace the content of `currentTransform`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withCurrentTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements)`
  Copy the current immutable object with elements that replace the content of `currentTransform`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withMaxImageArrayLayers(int value)`
  Copy the current immutable object by setting a value for the `maxImageArrayLayers` attribute.
  `final VulkanSurfaceCapabilitiesKHR`
  `withMaxImageCount(int value)`
  Copy the current immutable object by setting a value for the `maxImageCount` attribute.
  `final VulkanSurfaceCapabilitiesKHR`
  `withMaxImageExtent(VulkanExtent2D value)`
  Copy the current immutable object by setting a value for the `maxImageExtent` attribute.
  `final VulkanSurfaceCapabilitiesKHR`
  `withMinImageCount(int value)`
  Copy the current immutable object by setting a value for the `minImageCount` attribute.
  `final VulkanSurfaceCapabilitiesKHR`
  `withMinImageExtent(VulkanExtent2D value)`
  Copy the current immutable object by setting a value for the `minImageExtent` attribute.
  `final VulkanSurfaceCapabilitiesKHR`
  `withSupportedCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements)`
  Copy the current immutable object with elements that replace the content of `supportedCompositeAlpha`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withSupportedCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements)`
  Copy the current immutable object with elements that replace the content of `supportedCompositeAlpha`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withSupportedTransforms(VulkanSurfaceTransformFlagKHR... elements)`
  Copy the current immutable object with elements that replace the content of `supportedTransforms`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withSupportedTransforms(Iterable<VulkanSurfaceTransformFlagKHR> elements)`
  Copy the current immutable object with elements that replace the content of `supportedTransforms`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withSupportedUsageFlags(VulkanImageUsageFlag... elements)`
  Copy the current immutable object with elements that replace the content of `supportedUsageFlags`.
  `final VulkanSurfaceCapabilitiesKHR`
  `withSupportedUsageFlags(Iterable<VulkanImageUsageFlag> elements)`
  Copy the current immutable object with elements that replace the content of `supportedUsageFlags`.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### minImageCount

    public int minImageCount()
    Specified by:
      `minImageCount` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the minimum number of images the specified device supports for a swapchain created for the surface.

  - ### maxImageCount

    public int maxImageCount()
    Specified by:
      `maxImageCount` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the maximum number of images the specified device supports for a swapchain created for the surface. A value of 0 means that there is no limit on the number of images, though there may be limits related to the total amount of memory used by swapchain images.

  - ### currentExtent

    public VulkanExtent2D currentExtent()
    Specified by:
      `currentExtent` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the current width and height of the surface, or the special value $(0xFFFFFFFF, 0xFFFFFFFF)$ indicating that the surface size will be determined by the extent of a swapchain targeting the surface.

  - ### minImageExtent

    public VulkanExtent2D minImageExtent()
    Specified by:
      `minImageExtent` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the smallest valid swapchain extent for the surface on the specified device.

  - ### maxImageExtent

    public VulkanExtent2D maxImageExtent()
    Specified by:
      `maxImageExtent` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the largest valid swapchain extent for the surface on the specified device.

  - ### maxImageArrayLayers

    public int maxImageArrayLayers()
    Specified by:
      `maxImageArrayLayers` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the maximum number of layers swapchain images can have for a swapchain created for this device and surface.

  - ### supportedTransforms

    public Set<VulkanSurfaceTransformFlagKHR> supportedTransforms()
    Specified by:
      `supportedTransforms` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the presentation transforms supported for the surface on the specified device.

  - ### currentTransform

    public Set<VulkanSurfaceTransformFlagKHR> currentTransform()
    Specified by:
      `currentTransform` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the surface’s current transform relative to the presentation engine’s natural orientation.

  - ### supportedCompositeAlpha

    public Set<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha()
    Specified by:
      `supportedCompositeAlpha` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the alpha compositing modes supported by the presentation engine for the surface on the specified device. Opaque composition can be achieved in any alpha compositing mode by either using a swapchain image format that has no alpha component, or by ensuring that all pixels in the swapchain images have an alpha value of 1.0.

  - ### supportedUsageFlags

    public Set<VulkanImageUsageFlag> supportedUsageFlags()
    Specified by:
      `supportedUsageFlags` in interface `VulkanSurfaceCapabilitiesKHRType`
    Returns:
      the ways the application can use the presentable images of a swapchain created for the surface on the specified device. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set but implementations may support additional usages.

  - ### withMinImageCount

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

  - ### withMaxImageCount

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

  - ### withCurrentExtent

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

  - ### withMinImageExtent

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

  - ### withMaxImageExtent

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

  - ### withMaxImageArrayLayers

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

  - ### withSupportedTransforms

    public final VulkanSurfaceCapabilitiesKHR withSupportedTransforms(VulkanSurfaceTransformFlagKHR... elements)
    Copy the current immutable object with elements that replace the content of `supportedTransforms`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withSupportedTransforms

    public final VulkanSurfaceCapabilitiesKHR withSupportedTransforms(Iterable<VulkanSurfaceTransformFlagKHR> elements)
    Copy the current immutable object with elements that replace the content of `supportedTransforms`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of supportedTransforms elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withCurrentTransform

    public final VulkanSurfaceCapabilitiesKHR withCurrentTransform(VulkanSurfaceTransformFlagKHR... elements)
    Copy the current immutable object with elements that replace the content of `currentTransform`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withCurrentTransform

    public final VulkanSurfaceCapabilitiesKHR withCurrentTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements)
    Copy the current immutable object with elements that replace the content of `currentTransform`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of currentTransform elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withSupportedCompositeAlpha

    public final VulkanSurfaceCapabilitiesKHR withSupportedCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements)
    Copy the current immutable object with elements that replace the content of `supportedCompositeAlpha`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withSupportedCompositeAlpha

    public final VulkanSurfaceCapabilitiesKHR withSupportedCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements)
    Copy the current immutable object with elements that replace the content of `supportedCompositeAlpha`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of supportedCompositeAlpha elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### withSupportedUsageFlags

    public final VulkanSurfaceCapabilitiesKHR withSupportedUsageFlags(VulkanImageUsageFlag... elements)
    Copy the current immutable object with elements that replace the content of `supportedUsageFlags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withSupportedUsageFlags

    public final VulkanSurfaceCapabilitiesKHR withSupportedUsageFlags(Iterable<VulkanImageUsageFlag> elements)
    Copy the current immutable object with elements that replace the content of `supportedUsageFlags`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of supportedUsageFlags elements to set
    Returns:
      A modified copy or `this` if not changed

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanSurfaceCapabilitiesKHR` 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: `minImageCount`, `maxImageCount`, `currentExtent`, `minImageExtent`, `maxImageExtent`, `maxImageArrayLayers`, `supportedTransforms`, `currentTransform`, `supportedCompositeAlpha`, `supportedUsageFlags`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static VulkanSurfaceCapabilitiesKHR of(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Set<VulkanSurfaceTransformFlagKHR> supportedTransforms, Set<VulkanSurfaceTransformFlagKHR> currentTransform, Set<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Set<VulkanImageUsageFlag> supportedUsageFlags)
    Construct a new immutable `VulkanSurfaceCapabilitiesKHR` instance.
    Parameters:
      `minImageCount` - The value for the `minImageCount` attribute
      `maxImageCount` - The value for the `maxImageCount` attribute
      `currentExtent` - The value for the `currentExtent` attribute
      `minImageExtent` - The value for the `minImageExtent` attribute
      `maxImageExtent` - The value for the `maxImageExtent` attribute
      `maxImageArrayLayers` - The value for the `maxImageArrayLayers` attribute
      `supportedTransforms` - The value for the `supportedTransforms` attribute
      `currentTransform` - The value for the `currentTransform` attribute
      `supportedCompositeAlpha` - The value for the `supportedCompositeAlpha` attribute
      `supportedUsageFlags` - The value for the `supportedUsageFlags` attribute
    Returns:
      An immutable VulkanSurfaceCapabilitiesKHR instance

  - ### of

    public static VulkanSurfaceCapabilitiesKHR of(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Iterable<VulkanSurfaceTransformFlagKHR> supportedTransforms, Iterable<VulkanSurfaceTransformFlagKHR> currentTransform, Iterable<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Iterable<VulkanImageUsageFlag> supportedUsageFlags)
    Construct a new immutable `VulkanSurfaceCapabilitiesKHR` instance.
    Parameters:
      `minImageCount` - The value for the `minImageCount` attribute
      `maxImageCount` - The value for the `maxImageCount` attribute
      `currentExtent` - The value for the `currentExtent` attribute
      `minImageExtent` - The value for the `minImageExtent` attribute
      `maxImageExtent` - The value for the `maxImageExtent` attribute
      `maxImageArrayLayers` - The value for the `maxImageArrayLayers` attribute
      `supportedTransforms` - The value for the `supportedTransforms` attribute
      `currentTransform` - The value for the `currentTransform` attribute
      `supportedCompositeAlpha` - The value for the `supportedCompositeAlpha` attribute
      `supportedUsageFlags` - The value for the `supportedUsageFlags` attribute
    Returns:
      An immutable VulkanSurfaceCapabilitiesKHR instance

  - ### copyOf

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

  - ### builder

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

        VulkanSurfaceCapabilitiesKHR.builder()
           .setMinImageCount(int) // required minImageCount
           .setMaxImageCount(int) // required maxImageCount
           .setCurrentExtent(com.io7m.jcoronado.api.VulkanExtent2D) // required currentExtent
           .setMinImageExtent(com.io7m.jcoronado.api.VulkanExtent2D) // required minImageExtent
           .setMaxImageExtent(com.io7m.jcoronado.api.VulkanExtent2D) // required maxImageExtent
           .setMaxImageArrayLayers(int) // required maxImageArrayLayers
           .addSupportedTransforms|addAllSupportedTransforms(com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceTransformFlagKHR) // supportedTransforms elements
           .addCurrentTransform|addAllCurrentTransform(com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceTransformFlagKHR) // currentTransform elements
           .addSupportedCompositeAlpha|addAllSupportedCompositeAlpha(com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanCompositeAlphaFlagKHR) // supportedCompositeAlpha elements
           .addSupportedUsageFlags|addAllSupportedUsageFlags(com.io7m.jcoronado.api.VulkanImageUsageFlag) // supportedUsageFlags elements
           .build();

    Returns:
      A new VulkanSurfaceCapabilitiesKHR builder