# Class VulkanFramebufferCreateInfo

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

All Implemented Interfaces:
  `VulkanFramebufferCreateInfoType`

public final class VulkanFramebufferCreateInfo extends Object implements VulkanFramebufferCreateInfoType
Structure specifying parameters of a newly created framebuffer.

See Also:
  - "VkFramebufferCreateInfo"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<VulkanImageViewType>`
  `attachments()`
  `static VulkanFramebufferCreateInfo.Builder`
  `builder()`
  Creates a builder for `VulkanFramebufferCreateInfo`.
  `static VulkanFramebufferCreateInfo`
  `copyOf(VulkanFramebufferCreateInfoType instance)`
  Creates an immutable copy of a `VulkanFramebufferCreateInfoType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanFramebufferCreateInfo` that have equal attribute values.
  `Set<VulkanFramebufferCreateFlag>`
  `flags()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `flags`, `renderPass`, `attachments`, `width`, `height`, `layers`.
  `int`
  `height()`
  `int`
  `layers()`
  `VulkanRenderPassType`
  `renderPass()`
  `String`
  `toString()`
  Prints the immutable value `VulkanFramebufferCreateInfo` with attribute values.
  `int`
  `width()`
  `final VulkanFramebufferCreateInfo`
  `withAttachments(VulkanImageViewType... elements)`
  Copy the current immutable object with elements that replace the content of `attachments`.
  `final VulkanFramebufferCreateInfo`
  `withAttachments(Iterable<? extends VulkanImageViewType> elements)`
  Copy the current immutable object with elements that replace the content of `attachments`.
  `final VulkanFramebufferCreateInfo`
  `withFlags(VulkanFramebufferCreateFlag... elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanFramebufferCreateInfo`
  `withFlags(Iterable<VulkanFramebufferCreateFlag> elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanFramebufferCreateInfo`
  `withHeight(int value)`
  Copy the current immutable object by setting a value for the `height` attribute.
  `final VulkanFramebufferCreateInfo`
  `withLayers(int value)`
  Copy the current immutable object by setting a value for the `layers` attribute.
  `final VulkanFramebufferCreateInfo`
  `withRenderPass(VulkanRenderPassType value)`
  Copy the current immutable object by setting a value for the `renderPass` attribute.
  `final VulkanFramebufferCreateInfo`
  `withWidth(int value)`
  Copy the current immutable object by setting a value for the `width` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### flags

    public Set<VulkanFramebufferCreateFlag> flags()
    Specified by:
      `flags` in interface `VulkanFramebufferCreateInfoType`
    Returns:
      Flags specifying how the framebuffer will be generated.

  - ### renderPass

    public VulkanRenderPassType renderPass()
    Specified by:
      `renderPass` in interface `VulkanFramebufferCreateInfoType`
    Returns:
      A render pass that defines what render passes with which the framebuffer will be compatible.

  - ### attachments

    public List<VulkanImageViewType> attachments()
    Specified by:
      `attachments` in interface `VulkanFramebufferCreateInfoType`
    Returns:
      A list of image view handles, each of which will be used as the corresponding attachment in a render pass instance.

  - ### width

    public int width()
    Specified by:
      `width` in interface `VulkanFramebufferCreateInfoType`
    Returns:
      The width of the framebuffer

  - ### height

    public int height()
    Specified by:
      `height` in interface `VulkanFramebufferCreateInfoType`
    Returns:
      The height of the framebuffer

  - ### layers

    public int layers()
    Specified by:
      `layers` in interface `VulkanFramebufferCreateInfoType`
    Returns:
      The number of layers in the framebuffer

  - ### withFlags

    public final VulkanFramebufferCreateInfo withFlags(VulkanFramebufferCreateFlag... elements)
    Copy the current immutable object with elements that replace the content of `flags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withFlags

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

  - ### withRenderPass

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

  - ### withAttachments

    public final VulkanFramebufferCreateInfo withAttachments(VulkanImageViewType... elements)
    Copy the current immutable object with elements that replace the content of `attachments`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withAttachments

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

  - ### withWidth

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

  - ### withHeight

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

  - ### withLayers

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanFramebufferCreateInfo` 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: `flags`, `renderPass`, `attachments`, `width`, `height`, `layers`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

        VulkanFramebufferCreateInfo.builder()
           .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanFramebufferCreateFlag) // flags elements
           .setRenderPass(com.io7m.jcoronado.api.VulkanRenderPassType) // required renderPass
           .addAttachments|addAllAttachments(com.io7m.jcoronado.api.VulkanImageViewType) // attachments elements
           .setWidth(int) // optional width
           .setHeight(int) // optional height
           .setLayers(int) // optional layers
           .build();

    Returns:
      A new VulkanFramebufferCreateInfo builder