Class VulkanImageViewCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageViewCreateInfo.Builder
- Enclosing class:
VulkanImageViewCreateInfo
Builds instances of type
VulkanImageViewCreateInfo.
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 TypeMethodDescriptionaddAllFlags(Iterable<VulkanImageViewCreateFlag> elements) Adds elements toflagsset.addFlags(VulkanImageViewCreateFlag element) Adds one element toflagsset.addFlags(VulkanImageViewCreateFlag... elements) Adds elements toflagsset.build()Builds a newVulkanImageViewCreateInfo.from(VulkanImageViewCreateInfoType instance) Fill a builder with attribute values from the providedVulkanImageViewCreateInfoTypeinstance.setComponents(VulkanComponentMapping components) Initializes the value for thecomponentsattribute.setFlags(Iterable<VulkanImageViewCreateFlag> elements) Sets or replaces all elements forflagsset.setFormat(VulkanFormat format) Initializes the value for theformatattribute.setImage(VulkanImageType image) Initializes the value for theimageattribute.setSubresourceRange(VulkanImageSubresourceRange subresourceRange) Initializes the value for thesubresourceRangeattribute.setViewType(VulkanImageViewKind viewType) Initializes the value for theviewTypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageViewCreateInfoTypeinstance. 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:
thisbuilder for use in a chained invocation
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
public final VulkanImageViewCreateInfo.Builder setFlags(Iterable<VulkanImageViewCreateFlag> elements) Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
public final VulkanImageViewCreateInfo.Builder addAllFlags(Iterable<VulkanImageViewCreateFlag> elements) Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setImage
Initializes the value for theimageattribute.- Parameters:
image- The value for image- Returns:
thisbuilder for use in a chained invocation
-
setViewType
-
setFormat
-
setComponents
Initializes the value for thecomponentsattribute.If not set, this attribute will have a default value as returned by the initializer of
components.- Parameters:
components- The value for components- Returns:
thisbuilder for use in a chained invocation
-
setSubresourceRange
public final VulkanImageViewCreateInfo.Builder setSubresourceRange(VulkanImageSubresourceRange subresourceRange) Initializes the value for thesubresourceRangeattribute.If not set, this attribute will have a default value as returned by the initializer of
subresourceRange.- Parameters:
subresourceRange- The value for subresourceRange- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanImageViewCreateInfo.- Returns:
- An immutable instance of VulkanImageViewCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-