# Class VulkanPushConstantRange

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

All Implemented Interfaces:
  `VulkanPushConstantRangeType`

public final class VulkanPushConstantRange extends Object implements VulkanPushConstantRangeType
Structure specifying a push constant range.

See Also:
  - "VkPushConstantRange"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanPushConstantRange.Builder`
  `builder()`
  Creates a builder for `VulkanPushConstantRange`.
  `static VulkanPushConstantRange`
  `copyOf(VulkanPushConstantRangeType instance)`
  Creates an immutable copy of a `VulkanPushConstantRangeType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanPushConstantRange` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `stageFlags`, `offset`, `size`.
  `int`
  `offset()`
  `int`
  `size()`
  `Set<VulkanShaderStageFlag>`
  `stageFlags()`
  `String`
  `toString()`
  Prints the immutable value `VulkanPushConstantRange` with attribute values.
  `final VulkanPushConstantRange`
  `withOffset(int value)`
  Copy the current immutable object by setting a value for the `offset` attribute.
  `final VulkanPushConstantRange`
  `withSize(int value)`
  Copy the current immutable object by setting a value for the `size` attribute.
  `final VulkanPushConstantRange`
  `withStageFlags(VulkanShaderStageFlag... elements)`
  Copy the current immutable object with elements that replace the content of `stageFlags`.
  `final VulkanPushConstantRange`
  `withStageFlags(Iterable<VulkanShaderStageFlag> elements)`
  Copy the current immutable object with elements that replace the content of `stageFlags`.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### stageFlags

    public Set<VulkanShaderStageFlag> stageFlags()
    Specified by:
      `stageFlags` in interface `VulkanPushConstantRangeType`
    Returns:
      The stages that will access the range of push constants

  - ### offset

    public int offset()
    Specified by:
      `offset` in interface `VulkanPushConstantRangeType`
    Returns:
      The start of the range

  - ### size

    public int size()
    Specified by:
      `size` in interface `VulkanPushConstantRangeType`
    Returns:
      The size of the range

  - ### withStageFlags

    public final VulkanPushConstantRange withStageFlags(VulkanShaderStageFlag... elements)
    Copy the current immutable object with elements that replace the content of `stageFlags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withStageFlags

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

  - ### withOffset

    public final VulkanPushConstantRange withOffset(int 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

  - ### withSize

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

  - ### equals

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

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

        VulkanPushConstantRange.builder()
           .addStageFlags|addAllStageFlags(com.io7m.jcoronado.api.VulkanShaderStageFlag) // stageFlags elements
           .setOffset(int) // optional offset
           .setSize(int) // optional size
           .build();

    Returns:
      A new VulkanPushConstantRange builder