Class VulkanBufferCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferCreateInfo.Builder
- Enclosing class:
VulkanBufferCreateInfo
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 Summary
Modifier and TypeMethodDescriptionaddAllFlags(Iterable<VulkanBufferCreateFlag> elements) Adds elements toflagsset.addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Adds elements toqueueFamilyIndiceslist.addAllUsageFlags(Iterable<VulkanBufferUsageFlag> elements) Adds elements tousageFlagsset.addFlags(VulkanBufferCreateFlag element) Adds one element toflagsset.addFlags(VulkanBufferCreateFlag... elements) Adds elements toflagsset.Adds one element toqueueFamilyIndiceslist.addQueueFamilyIndices(VulkanQueueFamilyIndex... elements) Adds elements toqueueFamilyIndiceslist.addUsageFlags(VulkanBufferUsageFlag element) Adds one element tousageFlagsset.addUsageFlags(VulkanBufferUsageFlag... elements) Adds elements tousageFlagsset.build()Builds a newVulkanBufferCreateInfo.from(VulkanBufferCreateInfoType instance) Fill a builder with attribute values from the providedVulkanBufferCreateInfoTypeinstance.setFlags(Iterable<VulkanBufferCreateFlag> elements) Sets or replaces all elements forflagsset.setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Sets or replaces all elements forqueueFamilyIndiceslist.setSharingMode(VulkanSharingMode sharingMode) Initializes the value for thesharingModeattribute.setSize(long size) Initializes the value for thesizeattribute.setUsageFlags(Iterable<VulkanBufferUsageFlag> elements) Sets or replaces all elements forusageFlagsset.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanBufferCreateInfoTypeinstance. 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:
thisbuilder for use in a chained invocation
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setSize
-
addUsageFlags
Adds one element tousageFlagsset.- Parameters:
element- A usageFlags element- Returns:
thisbuilder for use in a chained invocation
-
addUsageFlags
Adds elements tousageFlagsset.- Parameters:
elements- An array of usageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setUsageFlags
Sets or replaces all elements forusageFlagsset.- Parameters:
elements- An iterable of usageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllUsageFlags
public final VulkanBufferCreateInfo.Builder addAllUsageFlags(Iterable<VulkanBufferUsageFlag> elements) Adds elements tousageFlagsset.- Parameters:
elements- An iterable of usageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setSharingMode
Initializes the value for thesharingModeattribute.If not set, this attribute will have a default value as returned by the initializer of
sharingMode.- Parameters:
sharingMode- The value for sharingMode- Returns:
thisbuilder for use in a chained invocation
-
addQueueFamilyIndices
Adds one element toqueueFamilyIndiceslist.- Parameters:
element- A queueFamilyIndices element- Returns:
thisbuilder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanBufferCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex... elements) Adds elements toqueueFamilyIndiceslist.- Parameters:
elements- An array of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
setQueueFamilyIndices
public final VulkanBufferCreateInfo.Builder setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Sets or replaces all elements forqueueFamilyIndiceslist.- Parameters:
elements- An iterable of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
addAllQueueFamilyIndices
public final VulkanBufferCreateInfo.Builder addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Adds elements toqueueFamilyIndiceslist.- Parameters:
elements- An iterable of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanBufferCreateInfo.- Returns:
- An immutable instance of VulkanBufferCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-