# Class VulkanBufferViewCreateInfo

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

All Implemented Interfaces:
  `VulkanBufferViewCreateInfoType`

public final class VulkanBufferViewCreateInfo extends Object implements VulkanBufferViewCreateInfoType
Information required to create a buffer.

See Also:
  - "VkBufferViewCreateInfo"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VulkanBufferType`
  `buffer()`
  `static VulkanBufferViewCreateInfo.Builder`
  `builder()`
  Creates a builder for `VulkanBufferViewCreateInfo`.
  `static VulkanBufferViewCreateInfo`
  `copyOf(VulkanBufferViewCreateInfoType instance)`
  Creates an immutable copy of a `VulkanBufferViewCreateInfoType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanBufferViewCreateInfo` that have equal attribute values.
  `Set<VulkanBufferViewCreateFlag>`
  `flags()`
  `VulkanFormat`
  `format()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `flags`, `buffer`, `format`, `offset`, `range`.
  `long`
  `offset()`
  `long`
  `range()`
  `String`
  `toString()`
  Prints the immutable value `VulkanBufferViewCreateInfo` with attribute values.
  `final VulkanBufferViewCreateInfo`
  `withBuffer(VulkanBufferType value)`
  Copy the current immutable object by setting a value for the `buffer` attribute.
  `final VulkanBufferViewCreateInfo`
  `withFlags(VulkanBufferViewCreateFlag... elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanBufferViewCreateInfo`
  `withFlags(Iterable<VulkanBufferViewCreateFlag> elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanBufferViewCreateInfo`
  `withFormat(VulkanFormat value)`
  Copy the current immutable object by setting a value for the `format` attribute.
  `final VulkanBufferViewCreateInfo`
  `withOffset(long value)`
  Copy the current immutable object by setting a value for the `offset` attribute.
  `final VulkanBufferViewCreateInfo`
  `withRange(long value)`
  Copy the current immutable object by setting a value for the `range` attribute.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### flags

    public Set<VulkanBufferViewCreateFlag> flags()
    Specified by:
      `flags` in interface `VulkanBufferViewCreateInfoType`
    Returns:
      A set of flags specifying additional parameters of the buffer view.

  - ### buffer

    public VulkanBufferType buffer()
    Specified by:
      `buffer` in interface `VulkanBufferViewCreateInfoType`
    Returns:
      The buffer on which the view will be created

  - ### format

    public VulkanFormat format()
    Specified by:
      `format` in interface `VulkanBufferViewCreateInfoType`
    Returns:
      The format of the data elements in the buffer

  - ### offset

    public long offset()
    Specified by:
      `offset` in interface `VulkanBufferViewCreateInfoType`
    Returns:
      An offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset.

  - ### range

    public long range()
    Specified by:
      `range` in interface `VulkanBufferViewCreateInfoType`
    Returns:
      A size in bytes of the buffer view. If range is equal to VK_WHOLE_SIZE, the range from offset to the end of the buffer is used. If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the texel block size of format, the nearest smaller multiple is used.

  - ### withFlags

    public final VulkanBufferViewCreateInfo withFlags(VulkanBufferViewCreateFlag... 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 VulkanBufferViewCreateInfo withFlags(Iterable<VulkanBufferViewCreateFlag> 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

  - ### withBuffer

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

  - ### withFormat

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

  - ### withOffset

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

  - ### withRange

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

  - ### equals

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

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

        VulkanBufferViewCreateInfo.builder()
           .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanBufferViewCreateFlag) // flags elements
           .setBuffer(com.io7m.jcoronado.api.VulkanBufferType) // required buffer
           .setFormat(com.io7m.jcoronado.api.VulkanFormat) // optional format
           .setOffset(long) // optional offset
           .setRange(long) // optional range
           .build();

    Returns:
      A new VulkanBufferViewCreateInfo builder