Class VulkanBufferCreateInfo.Builder

  • Enclosing class:
    VulkanBufferCreateInfo

    public static final class VulkanBufferCreateInfo.Builder
    extends java.lang.Object
    Builds instances of type VulkanBufferCreateInfo. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final VulkanBufferCreateInfo.Builder from​(VulkanBufferCreateInfoType instance)
        Fill a builder with attribute values from the provided VulkanBufferCreateInfoType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • setSize

        public final VulkanBufferCreateInfo.Builder setSize​(long size)
        Initializes the value for the size attribute.
        Parameters:
        size - The value for size
        Returns:
        this builder for use in a chained invocation
      • addQueueFamilyIndices

        public final VulkanBufferCreateInfo.Builder addQueueFamilyIndices​(int element)
        Adds one element to queueFamilyIndices list.
        Parameters:
        element - A queueFamilyIndices element
        Returns:
        this builder for use in a chained invocation
      • addQueueFamilyIndices

        public final VulkanBufferCreateInfo.Builder addQueueFamilyIndices​(int... elements)
        Adds elements to queueFamilyIndices list.
        Parameters:
        elements - An array of queueFamilyIndices elements
        Returns:
        this builder for use in a chained invocation
      • setQueueFamilyIndices

        public final VulkanBufferCreateInfo.Builder setQueueFamilyIndices​(java.lang.Iterable<java.lang.Integer> elements)
        Sets or replaces all elements for queueFamilyIndices list.
        Parameters:
        elements - An iterable of queueFamilyIndices elements
        Returns:
        this builder for use in a chained invocation
      • addAllQueueFamilyIndices

        public final VulkanBufferCreateInfo.Builder addAllQueueFamilyIndices​(java.lang.Iterable<java.lang.Integer> elements)
        Adds elements to queueFamilyIndices list.
        Parameters:
        elements - An iterable of queueFamilyIndices elements
        Returns:
        this builder for use in a chained invocation
      • build

        public VulkanBufferCreateInfo build()
        Returns:
        An immutable instance of VulkanBufferCreateInfo
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing