# Class VulkanComputePipelineCreateInfo

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

All Implemented Interfaces:
  `VulkanComputePipelineCreateInfoType`

public final class VulkanComputePipelineCreateInfo extends Object implements VulkanComputePipelineCreateInfoType
Structure specifying parameters of a newly created compute pipeline.

See Also:
  - "VkComputePipelineCreateInfo"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Optional<VulkanPipelineType>`
  `basePipeline()`
  `OptionalInt`
  `basePipelineIndex()`
  `static VulkanComputePipelineCreateInfo.Builder`
  `builder()`
  Creates a builder for `VulkanComputePipelineCreateInfo`.
  `static VulkanComputePipelineCreateInfo`
  `copyOf(VulkanComputePipelineCreateInfoType instance)`
  Creates an immutable copy of a `VulkanComputePipelineCreateInfoType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanComputePipelineCreateInfo` that have equal attribute values.
  `Set<VulkanPipelineCreateFlag>`
  `flags()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `flags`, `stage`, `layout`, `basePipeline`, `basePipelineIndex`.
  `VulkanPipelineLayoutType`
  `layout()`
  `static VulkanComputePipelineCreateInfo`
  `of(Iterable<VulkanPipelineCreateFlag> flags, VulkanPipelineShaderStageCreateInfo stage, VulkanPipelineLayoutType layout, Optional<? extends VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex)`
  Construct a new immutable `VulkanComputePipelineCreateInfo` instance.
  `static VulkanComputePipelineCreateInfo`
  `of(Set<VulkanPipelineCreateFlag> flags, VulkanPipelineShaderStageCreateInfo stage, VulkanPipelineLayoutType layout, Optional<VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex)`
  Construct a new immutable `VulkanComputePipelineCreateInfo` instance.
  `VulkanPipelineShaderStageCreateInfo`
  `stage()`
  `String`
  `toString()`
  Prints the immutable value `VulkanComputePipelineCreateInfo` with attribute values.
  `final VulkanComputePipelineCreateInfo`
  `withBasePipeline(VulkanPipelineType value)`
  Copy the current immutable object by setting a present value for the optional `basePipeline` attribute.
  `final VulkanComputePipelineCreateInfo`
  `withBasePipeline(Optional<? extends VulkanPipelineType> optional)`
  Copy the current immutable object by setting an optional value for the `basePipeline` attribute.
  `final VulkanComputePipelineCreateInfo`
  `withBasePipelineIndex(int value)`
  Copy the current immutable object by setting a present value for the optional `basePipelineIndex` attribute.
  `final VulkanComputePipelineCreateInfo`
  `withBasePipelineIndex(OptionalInt optional)`
  Copy the current immutable object by setting an optional value for the `basePipelineIndex` attribute.
  `final VulkanComputePipelineCreateInfo`
  `withFlags(VulkanPipelineCreateFlag... elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanComputePipelineCreateInfo`
  `withFlags(Iterable<VulkanPipelineCreateFlag> elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanComputePipelineCreateInfo`
  `withLayout(VulkanPipelineLayoutType value)`
  Copy the current immutable object by setting a value for the `layout` attribute.
  `final VulkanComputePipelineCreateInfo`
  `withStage(VulkanPipelineShaderStageCreateInfo value)`
  Copy the current immutable object by setting a value for the `stage` attribute.

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

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

- ## Method Details

  - ### flags

    public Set<VulkanPipelineCreateFlag> flags()
    Specified by:
      `flags` in interface `VulkanComputePipelineCreateInfoType`
    Returns:
      Flags specifying how the pipeline will be generated.

  - ### stage

    public VulkanPipelineShaderStageCreateInfo stage()
    Specified by:
      `stage` in interface `VulkanComputePipelineCreateInfoType`
    Returns:
      The shader stages to be included in the graphics pipeline.

  - ### layout

    public VulkanPipelineLayoutType layout()
    Specified by:
      `layout` in interface `VulkanComputePipelineCreateInfoType`
    Returns:
      The description of binding locations used by both the pipeline and descriptor sets used with the pipeline.

  - ### basePipeline

    public Optional<VulkanPipelineType> basePipeline()
    Specified by:
      `basePipeline` in interface `VulkanComputePipelineCreateInfoType`
    Returns:
      A pipeline to derive from.

  - ### basePipelineIndex

    public OptionalInt basePipelineIndex()
    Specified by:
      `basePipelineIndex` in interface `VulkanComputePipelineCreateInfoType`
    Returns:
      An index into the createInfos parameter to use as a pipeline to derive from.

  - ### withFlags

    public final VulkanComputePipelineCreateInfo withFlags(VulkanPipelineCreateFlag... 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 VulkanComputePipelineCreateInfo withFlags(Iterable<VulkanPipelineCreateFlag> 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 of `this` object

  - ### withStage

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

  - ### withLayout

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

  - ### withBasePipeline

    public final VulkanComputePipelineCreateInfo withBasePipeline(VulkanPipelineType value)
    Copy the current immutable object by setting a present value for the optional `basePipeline` attribute.
    Parameters:
      `value` - The value for basePipeline
    Returns:
      A modified copy of `this` object

  - ### withBasePipeline

    public final VulkanComputePipelineCreateInfo withBasePipeline(Optional<? extends VulkanPipelineType> optional)
    Copy the current immutable object by setting an optional value for the `basePipeline` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for basePipeline
    Returns:
      A modified copy of `this` object

  - ### withBasePipelineIndex

    public final VulkanComputePipelineCreateInfo withBasePipelineIndex(int value)
    Copy the current immutable object by setting a present value for the optional `basePipelineIndex` attribute.
    Parameters:
      `value` - The value for basePipelineIndex
    Returns:
      A modified copy of `this` object

  - ### withBasePipelineIndex

    public final VulkanComputePipelineCreateInfo withBasePipelineIndex(OptionalInt optional)
    Copy the current immutable object by setting an optional value for the `basePipelineIndex` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for basePipelineIndex
    Returns:
      A modified copy of `this` object

  - ### equals

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

  - ### toString

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

  - ### of

    public static VulkanComputePipelineCreateInfo of(Set<VulkanPipelineCreateFlag> flags, VulkanPipelineShaderStageCreateInfo stage, VulkanPipelineLayoutType layout, Optional<VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex)
    Construct a new immutable `VulkanComputePipelineCreateInfo` instance.
    Parameters:
      `flags` - The value for the `flags` attribute
      `stage` - The value for the `stage` attribute
      `layout` - The value for the `layout` attribute
      `basePipeline` - The value for the `basePipeline` attribute
      `basePipelineIndex` - The value for the `basePipelineIndex` attribute
    Returns:
      An immutable VulkanComputePipelineCreateInfo instance

  - ### of

    public static VulkanComputePipelineCreateInfo of(Iterable<VulkanPipelineCreateFlag> flags, VulkanPipelineShaderStageCreateInfo stage, VulkanPipelineLayoutType layout, Optional<? extends VulkanPipelineType> basePipeline, OptionalInt basePipelineIndex)
    Construct a new immutable `VulkanComputePipelineCreateInfo` instance.
    Parameters:
      `flags` - The value for the `flags` attribute
      `stage` - The value for the `stage` attribute
      `layout` - The value for the `layout` attribute
      `basePipeline` - The value for the `basePipeline` attribute
      `basePipelineIndex` - The value for the `basePipelineIndex` attribute
    Returns:
      An immutable VulkanComputePipelineCreateInfo instance

  - ### copyOf

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

  - ### builder

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

         VulkanComputePipelineCreateInfo.builder()
            .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineCreateFlag) // flags elements
            .setStage(com.io7m.jcoronado.api.VulkanPipelineShaderStageCreateInfo) // required stage
            .setLayout(com.io7m.jcoronado.api.VulkanPipelineLayoutType) // required layout
            .setBasePipeline(com.io7m.jcoronado.api.VulkanPipelineType) // optional basePipeline
            .setBasePipelineIndex(int) // optional basePipelineIndex
            .build();

    Returns:
      A new VulkanComputePipelineCreateInfo builder