Module com.io7m.jcoronado.api
Package com.io7m.jcoronado.api
Class VulkanImageViewCreateInfo.Builder
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageViewCreateInfo.Builder
-
- Enclosing class:
- VulkanImageViewCreateInfo
public static final class VulkanImageViewCreateInfo.Builder extends java.lang.Object
Builds instances of typeVulkanImageViewCreateInfo
. 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 VulkanImageViewCreateInfo.Builder from(VulkanImageViewCreateInfoType instance)
Fill a builder with attribute values from the providedVulkanImageViewCreateInfoType
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 VulkanImageViewCreateInfo.Builder addFlags(VulkanImageViewCreateFlag element)
Adds one element toflags
set.- Parameters:
element
- A flags element- Returns:
this
builder for use in a chained invocation
-
addFlags
public final VulkanImageViewCreateInfo.Builder addFlags(VulkanImageViewCreateFlag... elements)
Adds elements toflags
set.- Parameters:
elements
- An array of flags elements- Returns:
this
builder for use in a chained invocation
-
setFlags
public final VulkanImageViewCreateInfo.Builder setFlags(java.lang.Iterable<VulkanImageViewCreateFlag> 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 VulkanImageViewCreateInfo.Builder addAllFlags(java.lang.Iterable<VulkanImageViewCreateFlag> elements)
Adds elements toflags
set.- Parameters:
elements
- An iterable of flags elements- Returns:
this
builder for use in a chained invocation
-
setImage
public final VulkanImageViewCreateInfo.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
-
setViewType
public final VulkanImageViewCreateInfo.Builder setViewType(VulkanImageViewKind viewType)
Initializes the value for theviewType
attribute.- Parameters:
viewType
- The value for viewType- Returns:
this
builder for use in a chained invocation
-
setFormat
public final VulkanImageViewCreateInfo.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
-
setComponents
public final VulkanImageViewCreateInfo.Builder setComponents(VulkanComponentMapping components)
Initializes the value for thecomponents
attribute.If not set, this attribute will have a default value as returned by the initializer of
components
.- Parameters:
components
- The value for components- Returns:
this
builder for use in a chained invocation
-
setSubresourceRange
public final VulkanImageViewCreateInfo.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 VulkanImageViewCreateInfo build()
Builds a newVulkanImageViewCreateInfo
.- Returns:
- An immutable instance of VulkanImageViewCreateInfo
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-