Class VulkanImageSubresource.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresource.Builder
- Enclosing class:
VulkanImageSubresource
Builds instances of type
VulkanImageSubresource.
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 newVulkanImageSubresource.from(VulkanImageSubresourceType instance) Fill a builder with attribute values from the providedVulkanImageSubresourceTypeinstance.setArrayLayer(int arrayLayer) Initializes the value for thearrayLayerattribute.setAspectMask(Iterable<VulkanImageAspectFlag> elements) Sets or replaces all elements foraspectMaskset.setMipLevel(int mipLevel) Initializes the value for themipLevelattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageSubresourceTypeinstance. 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
Sets or replaces all elements foraspectMaskset.- Parameters:
elements- An iterable of aspectMask elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAspectMask
public final VulkanImageSubresource.Builder addAllAspectMask(Iterable<VulkanImageAspectFlag> elements) Adds elements toaspectMaskset.- Parameters:
elements- An iterable of aspectMask elements- Returns:
thisbuilder for use in a chained invocation
-
setMipLevel
-
setArrayLayer
Initializes the value for thearrayLayerattribute.If not set, this attribute will have a default value as returned by the initializer of
arrayLayer.- Parameters:
arrayLayer- The value for arrayLayer- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanImageSubresource.- Returns:
- An immutable instance of VulkanImageSubresource
- Throws:
IllegalStateException- if any required attributes are missing
-