Class VulkanImageSubresourceLayers.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresourceLayers.Builder
- Enclosing class:
VulkanImageSubresourceLayers
Builds instances of type
VulkanImageSubresourceLayers.
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 TypeMethodDescriptionaddAllAspectMask(Iterable<VulkanImageAspectFlag> elements) Adds elements toaspectMaskset.addAspectMask(VulkanImageAspectFlag element) Adds one element toaspectMaskset.addAspectMask(VulkanImageAspectFlag... elements) Adds elements toaspectMaskset.build()Builds a newVulkanImageSubresourceLayers.from(VulkanImageSubresourceLayersType instance) Fill a builder with attribute values from the providedVulkanImageSubresourceLayersTypeinstance.setAspectMask(Iterable<VulkanImageAspectFlag> elements) Sets or replaces all elements foraspectMaskset.setBaseArrayLayer(int baseArrayLayer) Initializes the value for thebaseArrayLayerattribute.setLayerCount(int layerCount) Initializes the value for thelayerCountattribute.setMipLevel(int mipLevel) Initializes the value for themipLevelattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageSubresourceLayersTypeinstance. 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
-
addAspectMask
Adds one element toaspectMaskset.- Parameters:
element- A aspectMask element- Returns:
thisbuilder for use in a chained invocation
-
addAspectMask
Adds elements toaspectMaskset.- Parameters:
elements- An array of aspectMask elements- Returns:
thisbuilder for use in a chained invocation
-
setAspectMask
public final VulkanImageSubresourceLayers.Builder setAspectMask(Iterable<VulkanImageAspectFlag> elements) Sets or replaces all elements foraspectMaskset.- Parameters:
elements- An iterable of aspectMask elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAspectMask
public final VulkanImageSubresourceLayers.Builder addAllAspectMask(Iterable<VulkanImageAspectFlag> elements) Adds elements toaspectMaskset.- Parameters:
elements- An iterable of aspectMask elements- Returns:
thisbuilder for use in a chained invocation
-
setMipLevel
Initializes the value for themipLevelattribute.- Parameters:
mipLevel- The value for mipLevel- Returns:
thisbuilder for use in a chained invocation
-
setBaseArrayLayer
Initializes the value for thebaseArrayLayerattribute.- Parameters:
baseArrayLayer- The value for baseArrayLayer- Returns:
thisbuilder for use in a chained invocation
-
setLayerCount
Initializes the value for thelayerCountattribute.- Parameters:
layerCount- The value for layerCount- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanImageSubresourceLayers.- Returns:
- An immutable instance of VulkanImageSubresourceLayers
- Throws:
IllegalStateException- if any required attributes are missing
-