- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanBufferCreateInfo.Builder
-
- Enclosing class:
- VulkanBufferCreateInfo
public static final class VulkanBufferCreateInfo.Builder extends java.lang.Object
Builds instances of typeVulkanBufferCreateInfo
. Initialize attributes and then invoke thebuild()
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 Summary
-
-
-
Method Detail
-
from
public final VulkanBufferCreateInfo.Builder from(VulkanBufferCreateInfoType instance)
Fill a builder with attribute values from the providedVulkanBufferCreateInfoType
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
-
addFlags
public final VulkanBufferCreateInfo.Builder addFlags(VulkanBufferCreateFlag element)
Adds one element toflags
set.- Parameters:
element
- A flags element- Returns:
this
builder for use in a chained invocation
-
addFlags
public final VulkanBufferCreateInfo.Builder addFlags(VulkanBufferCreateFlag... elements)
Adds elements toflags
set.- Parameters:
elements
- An array of flags elements- Returns:
this
builder for use in a chained invocation
-
setFlags
public final VulkanBufferCreateInfo.Builder setFlags(java.lang.Iterable<VulkanBufferCreateFlag> elements)
Sets or replaces all elements forflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
addAllFlags
public final VulkanBufferCreateInfo.Builder addAllFlags(java.lang.Iterable<VulkanBufferCreateFlag> elements)
Adds elements toflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
setSize
public final VulkanBufferCreateInfo.Builder setSize(long size)
Initializes the value for thesize
attribute.- Parameters:
size
- The value for size- Returns:
this
builder for use in a chained invocation
-
addUsageFlags
public final VulkanBufferCreateInfo.Builder addUsageFlags(VulkanBufferUsageFlag element)
Adds one element tousageFlags
set.- Parameters:
element
- A usageFlags element- Returns:
this
builder for use in a chained invocation
-
addUsageFlags
public final VulkanBufferCreateInfo.Builder addUsageFlags(VulkanBufferUsageFlag... elements)
Adds elements tousageFlags
set.- Parameters:
elements
- An array of usageFlags elements- Returns:
this
builder for use in a chained invocation
-
setUsageFlags
public final VulkanBufferCreateInfo.Builder setUsageFlags(java.lang.Iterable<VulkanBufferUsageFlag> elements)
Sets or replaces all elements forusageFlags
set.- Parameters:
elements
- An iterable of usageFlags elements- Returns:
this
builder for use in a chained invocation
-
addAllUsageFlags
public final VulkanBufferCreateInfo.Builder addAllUsageFlags(java.lang.Iterable<VulkanBufferUsageFlag> elements)
Adds elements tousageFlags
set.- Parameters:
elements
- An iterable of usageFlags elements- Returns:
this
builder for use in a chained invocation
-
setSharingMode
public final VulkanBufferCreateInfo.Builder setSharingMode(VulkanSharingMode sharingMode)
Initializes the value for thesharingMode
attribute.- Parameters:
sharingMode
- The value for sharingMode- Returns:
this
builder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanBufferCreateInfo.Builder addQueueFamilyIndices(int element)
Adds one element toqueueFamilyIndices
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 toqueueFamilyIndices
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 forqueueFamilyIndices
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 toqueueFamilyIndices
list.- Parameters:
elements
- An iterable of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
build
public VulkanBufferCreateInfo build()
Builds a newVulkanBufferCreateInfo
.- Returns:
- An immutable instance of VulkanBufferCreateInfo
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-