# Class VulkanPhysicalDeviceMemoryProperties

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

All Implemented Interfaces:
  `VulkanPhysicalDeviceMemoryPropertiesType`

public final class VulkanPhysicalDeviceMemoryProperties extends Object implements VulkanPhysicalDeviceMemoryPropertiesType
The memory properties for a physical device.

See Also:
  - "VkPhysicalDeviceMemoryProperties"

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanPhysicalDeviceMemoryProperties.Builder`
  `builder()`
  Creates a builder for `VulkanPhysicalDeviceMemoryProperties`.
  `static VulkanPhysicalDeviceMemoryProperties`
  `copyOf(VulkanPhysicalDeviceMemoryPropertiesType instance)`
  Creates an immutable copy of a `VulkanPhysicalDeviceMemoryPropertiesType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanPhysicalDeviceMemoryProperties` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `heaps`, `types`.
  `SortedMap<VulkanMemoryHeapIndex,VulkanMemoryHeap>`
  `heaps()`
  `static VulkanPhysicalDeviceMemoryProperties`
  `of(SortedMap<VulkanMemoryHeapIndex,VulkanMemoryHeap> heaps, SortedMap<VulkanMemoryTypeIndex,VulkanMemoryType> types)`
  Construct a new immutable `VulkanPhysicalDeviceMemoryProperties` instance.
  `String`
  `toString()`
  Prints the immutable value `VulkanPhysicalDeviceMemoryProperties` with attribute values.
  `SortedMap<VulkanMemoryTypeIndex,VulkanMemoryType>`
  `types()`
  `final VulkanPhysicalDeviceMemoryProperties`
  `withHeaps(SortedMap<VulkanMemoryHeapIndex,VulkanMemoryHeap> value)`
  Copy the current immutable object by setting a value for the `heaps` attribute.
  `final VulkanPhysicalDeviceMemoryProperties`
  `withTypes(SortedMap<VulkanMemoryTypeIndex,VulkanMemoryType> value)`
  Copy the current immutable object by setting a value for the `types` attribute.

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

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

  ### Methods inherited from interface com.io7m.jcoronado.api.VulkanPhysicalDeviceMemoryPropertiesType

  `checkPreconditions, findSuitableMemoryType`

- ## Method Details

  - ### heaps

    public SortedMap<VulkanMemoryHeapIndex,VulkanMemoryHeap> heaps()
    Specified by:
      `heaps` in interface `VulkanPhysicalDeviceMemoryPropertiesType`
    Returns:
      The memory heaps from which memory can be allocated.

  - ### types

    public SortedMap<VulkanMemoryTypeIndex,VulkanMemoryType> types()
    Specified by:
      `types` in interface `VulkanPhysicalDeviceMemoryPropertiesType`
    Returns:
      The memory types that can be used to access memory allocated from the heaps specified by `heaps()`

  - ### withHeaps

    public final VulkanPhysicalDeviceMemoryProperties withHeaps(SortedMap<VulkanMemoryHeapIndex,VulkanMemoryHeap> value)
    Copy the current immutable object by setting a value for the `heaps` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for heaps
    Returns:
      A modified copy of the `this` object

  - ### withTypes

    public final VulkanPhysicalDeviceMemoryProperties withTypes(SortedMap<VulkanMemoryTypeIndex,VulkanMemoryType> value)
    Copy the current immutable object by setting a value for the `types` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for types
    Returns:
      A modified copy of the `this` object

  - ### equals

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

  - ### toString

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

  - ### of

    public static VulkanPhysicalDeviceMemoryProperties of(SortedMap<VulkanMemoryHeapIndex,VulkanMemoryHeap> heaps, SortedMap<VulkanMemoryTypeIndex,VulkanMemoryType> types)
    Construct a new immutable `VulkanPhysicalDeviceMemoryProperties` instance.
    Parameters:
      `heaps` - The value for the `heaps` attribute
      `types` - The value for the `types` attribute
    Returns:
      An immutable VulkanPhysicalDeviceMemoryProperties instance

  - ### copyOf

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

  - ### builder

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

         VulkanPhysicalDeviceMemoryProperties.builder()
            .setHeaps(SortedMap&lt;com.io7m.jcoronado.api.VulkanMemoryHeapIndex, VulkanMemoryHeap&gt;) // required heaps
            .setTypes(SortedMap&lt;com.io7m.jcoronado.api.VulkanMemoryTypeIndex, VulkanMemoryType&gt;) // required types
            .build();

    Returns:
      A new VulkanPhysicalDeviceMemoryProperties builder