Module com.io7m.jcoronado.api
Package com.io7m.jcoronado.api
Class VulkanAttachmentDescription.Builder
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanAttachmentDescription.Builder
-
- Enclosing class:
- VulkanAttachmentDescription
public static final class VulkanAttachmentDescription.Builder extends java.lang.Object
Builds instances of typeVulkanAttachmentDescription
. 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 VulkanAttachmentDescription.Builder from(VulkanAttachmentDescriptionType instance)
Fill a builder with attribute values from the providedVulkanAttachmentDescriptionType
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
public final VulkanAttachmentDescription.Builder addFlags(VulkanAttachmentDescriptionFlag element)
Adds one element toflags
set.- Parameters:
element
- A flags element- Returns:
this
builder for use in a chained invocation
-
addFlags
public final VulkanAttachmentDescription.Builder addFlags(VulkanAttachmentDescriptionFlag... elements)
Adds elements toflags
set.- Parameters:
elements
- An array of flags elements- Returns:
this
builder for use in a chained invocation
-
setFlags
public final VulkanAttachmentDescription.Builder setFlags(java.lang.Iterable<VulkanAttachmentDescriptionFlag> 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 VulkanAttachmentDescription.Builder addAllFlags(java.lang.Iterable<VulkanAttachmentDescriptionFlag> elements)
Adds elements toflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
setFormat
public final VulkanAttachmentDescription.Builder setFormat(VulkanFormat format)
Initializes the value for theformat
attribute.- Parameters:
format
- The value for format- Returns:
this
builder for use in a chained invocation
-
setSamples
public final VulkanAttachmentDescription.Builder setSamples(VulkanSampleCountFlag samples)
Initializes the value for thesamples
attribute.- Parameters:
samples
- The value for samples- Returns:
this
builder for use in a chained invocation
-
setLoadOp
public final VulkanAttachmentDescription.Builder setLoadOp(VulkanAttachmentLoadOp loadOp)
Initializes the value for theloadOp
attribute.- Parameters:
loadOp
- The value for loadOp- Returns:
this
builder for use in a chained invocation
-
setStoreOp
public final VulkanAttachmentDescription.Builder setStoreOp(VulkanAttachmentStoreOp storeOp)
Initializes the value for thestoreOp
attribute.- Parameters:
storeOp
- The value for storeOp- Returns:
this
builder for use in a chained invocation
-
setStencilLoadOp
public final VulkanAttachmentDescription.Builder setStencilLoadOp(VulkanAttachmentLoadOp stencilLoadOp)
Initializes the value for thestencilLoadOp
attribute.- Parameters:
stencilLoadOp
- The value for stencilLoadOp- Returns:
this
builder for use in a chained invocation
-
setStencilStoreOp
public final VulkanAttachmentDescription.Builder setStencilStoreOp(VulkanAttachmentStoreOp stencilStoreOp)
Initializes the value for thestencilStoreOp
attribute.- Parameters:
stencilStoreOp
- The value for stencilStoreOp- Returns:
this
builder for use in a chained invocation
-
setInitialLayout
public final VulkanAttachmentDescription.Builder setInitialLayout(VulkanImageLayout initialLayout)
Initializes the value for theinitialLayout
attribute.- Parameters:
initialLayout
- The value for initialLayout- Returns:
this
builder for use in a chained invocation
-
setFinalLayout
public final VulkanAttachmentDescription.Builder setFinalLayout(VulkanImageLayout finalLayout)
Initializes the value for thefinalLayout
attribute.- Parameters:
finalLayout
- The value for finalLayout- Returns:
this
builder for use in a chained invocation
-
build
public VulkanAttachmentDescription build()
Builds a newVulkanAttachmentDescription
.- Returns:
- An immutable instance of VulkanAttachmentDescription
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-