- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanMemoryBarrier.Builder
-
- Enclosing class:
- VulkanMemoryBarrier
public static final class VulkanMemoryBarrier.Builder extends java.lang.Object
Builds instances of typeVulkanMemoryBarrier
. 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 VulkanMemoryBarrier.Builder from(VulkanMemoryBarrierType instance)
Fill a builder with attribute values from the providedVulkanMemoryBarrierType
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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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 VulkanMemoryBarrier.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
-
build
public VulkanMemoryBarrier build()
Builds a newVulkanMemoryBarrier
.- Returns:
- An immutable instance of VulkanMemoryBarrier
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-