Class VulkanSubpassDescription.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanSubpassDescription.Builder
- Enclosing class:
VulkanSubpassDescription
Builds instances of type
VulkanSubpassDescription
.
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 TypeMethodDescriptionaddAllColorAttachments
(Iterable<? extends VulkanAttachmentReference> elements) Adds elements tocolorAttachments
list.addAllFlags
(Iterable<VulkanSubpassDescriptionFlag> elements) Adds elements toflags
set.addAllInputAttachments
(Iterable<? extends VulkanAttachmentReference> elements) Adds elements toinputAttachments
list.addAllPreserveAttachments
(Iterable<Integer> elements) Adds elements topreserveAttachments
list.addAllResolveAttachments
(Iterable<? extends VulkanAttachmentReference> elements) Adds elements toresolveAttachments
list.Adds one element tocolorAttachments
list.addColorAttachments
(VulkanAttachmentReference... elements) Adds elements tocolorAttachments
list.addFlags
(VulkanSubpassDescriptionFlag element) Adds one element toflags
set.addFlags
(VulkanSubpassDescriptionFlag... elements) Adds elements toflags
set.Adds one element toinputAttachments
list.addInputAttachments
(VulkanAttachmentReference... elements) Adds elements toinputAttachments
list.addPreserveAttachments
(int element) Adds one element topreserveAttachments
list.addPreserveAttachments
(int... elements) Adds elements topreserveAttachments
list.Adds one element toresolveAttachments
list.addResolveAttachments
(VulkanAttachmentReference... elements) Adds elements toresolveAttachments
list.build()
Builds a newVulkanSubpassDescription
.from
(VulkanSubpassDescriptionType instance) Fill a builder with attribute values from the providedVulkanSubpassDescriptionType
instance.setColorAttachments
(Iterable<? extends VulkanAttachmentReference> elements) Sets or replaces all elements forcolorAttachments
list.setDepthStencilAttachment
(VulkanAttachmentReference depthStencilAttachment) Initializes the optional valuedepthStencilAttachment
to depthStencilAttachment.setDepthStencilAttachment
(Optional<? extends VulkanAttachmentReference> depthStencilAttachment) Initializes the optional valuedepthStencilAttachment
to depthStencilAttachment.setFlags
(Iterable<VulkanSubpassDescriptionFlag> elements) Sets or replaces all elements forflags
set.setInputAttachments
(Iterable<? extends VulkanAttachmentReference> elements) Sets or replaces all elements forinputAttachments
list.setPipelineBindPoint
(VulkanPipelineBindPoint pipelineBindPoint) Initializes the value for thepipelineBindPoint
attribute.setPreserveAttachments
(Iterable<Integer> elements) Sets or replaces all elements forpreserveAttachments
list.setResolveAttachments
(Iterable<? extends VulkanAttachmentReference> elements) Sets or replaces all elements forresolveAttachments
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanSubpassDescriptionType
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
Adds one element toflags
set.- Parameters:
element
- A flags element- Returns:
this
builder for use in a chained invocation
-
addFlags
Adds elements toflags
set.- Parameters:
elements
- An array of flags elements- Returns:
this
builder for use in a chained invocation
-
setFlags
public final VulkanSubpassDescription.Builder setFlags(Iterable<VulkanSubpassDescriptionFlag> 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 VulkanSubpassDescription.Builder addAllFlags(Iterable<VulkanSubpassDescriptionFlag> elements) Adds elements toflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
setPipelineBindPoint
public final VulkanSubpassDescription.Builder setPipelineBindPoint(VulkanPipelineBindPoint pipelineBindPoint) Initializes the value for thepipelineBindPoint
attribute.- Parameters:
pipelineBindPoint
- The value for pipelineBindPoint- Returns:
this
builder for use in a chained invocation
-
addInputAttachments
public final VulkanSubpassDescription.Builder addInputAttachments(VulkanAttachmentReference element) Adds one element toinputAttachments
list.- Parameters:
element
- A inputAttachments element- Returns:
this
builder for use in a chained invocation
-
addInputAttachments
public final VulkanSubpassDescription.Builder addInputAttachments(VulkanAttachmentReference... elements) Adds elements toinputAttachments
list.- Parameters:
elements
- An array of inputAttachments elements- Returns:
this
builder for use in a chained invocation
-
setInputAttachments
public final VulkanSubpassDescription.Builder setInputAttachments(Iterable<? extends VulkanAttachmentReference> elements) Sets or replaces all elements forinputAttachments
list.- Parameters:
elements
- An iterable of inputAttachments elements- Returns:
this
builder for use in a chained invocation
-
addAllInputAttachments
public final VulkanSubpassDescription.Builder addAllInputAttachments(Iterable<? extends VulkanAttachmentReference> elements) Adds elements toinputAttachments
list.- Parameters:
elements
- An iterable of inputAttachments elements- Returns:
this
builder for use in a chained invocation
-
addColorAttachments
public final VulkanSubpassDescription.Builder addColorAttachments(VulkanAttachmentReference element) Adds one element tocolorAttachments
list.- Parameters:
element
- A colorAttachments element- Returns:
this
builder for use in a chained invocation
-
addColorAttachments
public final VulkanSubpassDescription.Builder addColorAttachments(VulkanAttachmentReference... elements) Adds elements tocolorAttachments
list.- Parameters:
elements
- An array of colorAttachments elements- Returns:
this
builder for use in a chained invocation
-
setColorAttachments
public final VulkanSubpassDescription.Builder setColorAttachments(Iterable<? extends VulkanAttachmentReference> elements) Sets or replaces all elements forcolorAttachments
list.- Parameters:
elements
- An iterable of colorAttachments elements- Returns:
this
builder for use in a chained invocation
-
addAllColorAttachments
public final VulkanSubpassDescription.Builder addAllColorAttachments(Iterable<? extends VulkanAttachmentReference> elements) Adds elements tocolorAttachments
list.- Parameters:
elements
- An iterable of colorAttachments elements- Returns:
this
builder for use in a chained invocation
-
addResolveAttachments
public final VulkanSubpassDescription.Builder addResolveAttachments(VulkanAttachmentReference element) Adds one element toresolveAttachments
list.- Parameters:
element
- A resolveAttachments element- Returns:
this
builder for use in a chained invocation
-
addResolveAttachments
public final VulkanSubpassDescription.Builder addResolveAttachments(VulkanAttachmentReference... elements) Adds elements toresolveAttachments
list.- Parameters:
elements
- An array of resolveAttachments elements- Returns:
this
builder for use in a chained invocation
-
setResolveAttachments
public final VulkanSubpassDescription.Builder setResolveAttachments(Iterable<? extends VulkanAttachmentReference> elements) Sets or replaces all elements forresolveAttachments
list.- Parameters:
elements
- An iterable of resolveAttachments elements- Returns:
this
builder for use in a chained invocation
-
addAllResolveAttachments
public final VulkanSubpassDescription.Builder addAllResolveAttachments(Iterable<? extends VulkanAttachmentReference> elements) Adds elements toresolveAttachments
list.- Parameters:
elements
- An iterable of resolveAttachments elements- Returns:
this
builder for use in a chained invocation
-
setDepthStencilAttachment
public final VulkanSubpassDescription.Builder setDepthStencilAttachment(VulkanAttachmentReference depthStencilAttachment) Initializes the optional valuedepthStencilAttachment
to depthStencilAttachment.- Parameters:
depthStencilAttachment
- The value for depthStencilAttachment- Returns:
this
builder for chained invocation
-
setDepthStencilAttachment
public final VulkanSubpassDescription.Builder setDepthStencilAttachment(Optional<? extends VulkanAttachmentReference> depthStencilAttachment) Initializes the optional valuedepthStencilAttachment
to depthStencilAttachment.- Parameters:
depthStencilAttachment
- The value for depthStencilAttachment- Returns:
this
builder for use in a chained invocation
-
addPreserveAttachments
Adds one element topreserveAttachments
list.- Parameters:
element
- A preserveAttachments element- Returns:
this
builder for use in a chained invocation
-
addPreserveAttachments
Adds elements topreserveAttachments
list.- Parameters:
elements
- An array of preserveAttachments elements- Returns:
this
builder for use in a chained invocation
-
setPreserveAttachments
Sets or replaces all elements forpreserveAttachments
list.- Parameters:
elements
- An iterable of preserveAttachments elements- Returns:
this
builder for use in a chained invocation
-
addAllPreserveAttachments
Adds elements topreserveAttachments
list.- Parameters:
elements
- An iterable of preserveAttachments elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newVulkanSubpassDescription
.- Returns:
- An immutable instance of VulkanSubpassDescription
- Throws:
IllegalStateException
- if any required attributes are missing
-