Module com.io7m.jcoronado.api
Package com.io7m.jcoronado.api
Class VulkanQueueFamilyProperties.Builder
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanQueueFamilyProperties.Builder
-
- Enclosing class:
- VulkanQueueFamilyProperties
public static final class VulkanQueueFamilyProperties.Builder extends java.lang.Object
Builds instances of typeVulkanQueueFamilyProperties
. 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 VulkanQueueFamilyProperties.Builder from(VulkanQueueFamilyPropertiesType instance)
Fill a builder with attribute values from the providedVulkanQueueFamilyPropertiesType
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
-
setQueueFamilyIndex
public final VulkanQueueFamilyProperties.Builder setQueueFamilyIndex(int queueFamilyIndex)
Initializes the value for thequeueFamilyIndex
attribute.- Parameters:
queueFamilyIndex
- The value for queueFamilyIndex- Returns:
this
builder for use in a chained invocation
-
setQueueCount
public final VulkanQueueFamilyProperties.Builder setQueueCount(int queueCount)
Initializes the value for thequeueCount
attribute.- Parameters:
queueCount
- The value for queueCount- Returns:
this
builder for use in a chained invocation
-
addQueueFlags
public final VulkanQueueFamilyProperties.Builder addQueueFlags(VulkanQueueFamilyPropertyFlag element)
Adds one element toqueueFlags
set.- Parameters:
element
- A queueFlags element- Returns:
this
builder for use in a chained invocation
-
addQueueFlags
public final VulkanQueueFamilyProperties.Builder addQueueFlags(VulkanQueueFamilyPropertyFlag... elements)
Adds elements toqueueFlags
set.- Parameters:
elements
- An array of queueFlags elements- Returns:
this
builder for use in a chained invocation
-
setQueueFlags
public final VulkanQueueFamilyProperties.Builder setQueueFlags(java.lang.Iterable<VulkanQueueFamilyPropertyFlag> elements)
Sets or replaces all elements forqueueFlags
set.- Parameters:
elements
- An iterable of queueFlags elements- Returns:
this
builder for use in a chained invocation
-
addAllQueueFlags
public final VulkanQueueFamilyProperties.Builder addAllQueueFlags(java.lang.Iterable<VulkanQueueFamilyPropertyFlag> elements)
Adds elements toqueueFlags
set.- Parameters:
elements
- An iterable of queueFlags elements- Returns:
this
builder for use in a chained invocation
-
setTimestampValidBits
public final VulkanQueueFamilyProperties.Builder setTimestampValidBits(int timestampValidBits)
Initializes the value for thetimestampValidBits
attribute.- Parameters:
timestampValidBits
- The value for timestampValidBits- Returns:
this
builder for use in a chained invocation
-
setMinImageTransferGranularity
public final VulkanQueueFamilyProperties.Builder setMinImageTransferGranularity(VulkanExtent3D minImageTransferGranularity)
Initializes the value for theminImageTransferGranularity
attribute.- Parameters:
minImageTransferGranularity
- The value for minImageTransferGranularity- Returns:
this
builder for use in a chained invocation
-
build
public VulkanQueueFamilyProperties build()
Builds a newVulkanQueueFamilyProperties
.- Returns:
- An immutable instance of VulkanQueueFamilyProperties
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-