- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageMemoryBarrier.Builder
-
- Enclosing class:
- VulkanImageMemoryBarrier
public static final class VulkanImageMemoryBarrier.Builder extends java.lang.Object
Builds instances of typeVulkanImageMemoryBarrier
. 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 VulkanImageMemoryBarrier.Builder from(VulkanImageMemoryBarrierType instance)
Fill a builder with attribute values from the providedVulkanImageMemoryBarrierType
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
-
addSourceAccessMask
public final VulkanImageMemoryBarrier.Builder addSourceAccessMask(VulkanAccessFlag element)
Adds one element tosourceAccessMask
set.- Parameters:
element
- A sourceAccessMask element- Returns:
this
builder for use in a chained invocation
-
addSourceAccessMask
public final VulkanImageMemoryBarrier.Builder addSourceAccessMask(VulkanAccessFlag... elements)
Adds elements tosourceAccessMask
set.- Parameters:
elements
- An array of sourceAccessMask elements- Returns:
this
builder for use in a chained invocation
-
setSourceAccessMask
public final VulkanImageMemoryBarrier.Builder setSourceAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Sets or replaces all elements forsourceAccessMask
set.- Parameters:
elements
- An iterable of sourceAccessMask elements- Returns:
this
builder for use in a chained invocation
-
addAllSourceAccessMask
public final VulkanImageMemoryBarrier.Builder addAllSourceAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Adds elements tosourceAccessMask
set.- Parameters:
elements
- An iterable of sourceAccessMask elements- Returns:
this
builder for use in a chained invocation
-
addTargetAccessMask
public final VulkanImageMemoryBarrier.Builder addTargetAccessMask(VulkanAccessFlag element)
Adds one element totargetAccessMask
set.- Parameters:
element
- A targetAccessMask element- Returns:
this
builder for use in a chained invocation
-
addTargetAccessMask
public final VulkanImageMemoryBarrier.Builder addTargetAccessMask(VulkanAccessFlag... elements)
Adds elements totargetAccessMask
set.- Parameters:
elements
- An array of targetAccessMask elements- Returns:
this
builder for use in a chained invocation
-
setTargetAccessMask
public final VulkanImageMemoryBarrier.Builder setTargetAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Sets or replaces all elements fortargetAccessMask
set.- Parameters:
elements
- An iterable of targetAccessMask elements- Returns:
this
builder for use in a chained invocation
-
addAllTargetAccessMask
public final VulkanImageMemoryBarrier.Builder addAllTargetAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Adds elements totargetAccessMask
set.- Parameters:
elements
- An iterable of targetAccessMask elements- Returns:
this
builder for use in a chained invocation
-
setOldLayout
public final VulkanImageMemoryBarrier.Builder setOldLayout(VulkanImageLayout oldLayout)
Initializes the value for theoldLayout
attribute.- Parameters:
oldLayout
- The value for oldLayout- Returns:
this
builder for use in a chained invocation
-
setNewLayout
public final VulkanImageMemoryBarrier.Builder setNewLayout(VulkanImageLayout newLayout)
Initializes the value for thenewLayout
attribute.- Parameters:
newLayout
- The value for newLayout- Returns:
this
builder for use in a chained invocation
-
setSourceQueueFamilyIndex
public final VulkanImageMemoryBarrier.Builder setSourceQueueFamilyIndex(int sourceQueueFamilyIndex)
Initializes the value for thesourceQueueFamilyIndex
attribute.- Parameters:
sourceQueueFamilyIndex
- The value for sourceQueueFamilyIndex- Returns:
this
builder for use in a chained invocation
-
setTargetQueueFamilyIndex
public final VulkanImageMemoryBarrier.Builder setTargetQueueFamilyIndex(int targetQueueFamilyIndex)
Initializes the value for thetargetQueueFamilyIndex
attribute.- Parameters:
targetQueueFamilyIndex
- The value for targetQueueFamilyIndex- Returns:
this
builder for use in a chained invocation
-
setImage
public final VulkanImageMemoryBarrier.Builder setImage(VulkanImageType image)
Initializes the value for theimage
attribute.- Parameters:
image
- The value for image- Returns:
this
builder for use in a chained invocation
-
setSubresourceRange
public final VulkanImageMemoryBarrier.Builder setSubresourceRange(VulkanImageSubresourceRange subresourceRange)
Initializes the value for thesubresourceRange
attribute.- Parameters:
subresourceRange
- The value for subresourceRange- Returns:
this
builder for use in a chained invocation
-
build
public VulkanImageMemoryBarrier build()
Builds a newVulkanImageMemoryBarrier
.- Returns:
- An immutable instance of VulkanImageMemoryBarrier
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-