Class VulkanMemoryHeap

  • All Implemented Interfaces:
    VulkanMemoryHeapType

    public final class VulkanMemoryHeap
    extends java.lang.Object
    implements VulkanMemoryHeapType
    Structure specifying a memory heap.
    See Also:
    "VkMemoryHeap"
    • Method Detail

      • size

        public long size()
        Specified by:
        size in interface VulkanMemoryHeapType
        Returns:
        The total memory size in bytes in the heap.
      • withSize

        public final VulkanMemoryHeap withSize​(long 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 of the this object
      • withFlags

        public final VulkanMemoryHeap withFlags​(VulkanMemoryHeapFlag... 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 VulkanMemoryHeap withFlags​(java.lang.Iterable<VulkanMemoryHeapFlag> 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
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of VulkanMemoryHeap that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: size, flags.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value VulkanMemoryHeap with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static VulkanMemoryHeap of​(long size,
                                          java.util.Set<VulkanMemoryHeapFlag> flags)
        Construct a new immutable VulkanMemoryHeap instance.
        Parameters:
        size - The value for the size attribute
        flags - The value for the flags attribute
        Returns:
        An immutable VulkanMemoryHeap instance
      • of

        public static VulkanMemoryHeap of​(long size,
                                          java.lang.Iterable<VulkanMemoryHeapFlag> flags)
        Construct a new immutable VulkanMemoryHeap instance.
        Parameters:
        size - The value for the size attribute
        flags - The value for the flags attribute
        Returns:
        An immutable VulkanMemoryHeap instance
      • copyOf

        public static VulkanMemoryHeap copyOf​(VulkanMemoryHeapType instance)
        Creates an immutable copy of a VulkanMemoryHeapType 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 VulkanMemoryHeap instance