Class VulkanImageSubresourceRange.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageSubresourceRange.Builder
- Enclosing class:
VulkanImageSubresourceRange
Builds instances of type
VulkanImageSubresourceRange.
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 newVulkanImageSubresourceRange.from(VulkanImageSubresourceRangeType instance) Fill a builder with attribute values from the providedVulkanImageSubresourceRangeTypeinstance.setAspectMask(Iterable<VulkanImageAspectFlag> elements) Sets or replaces all elements foraspectMaskset.setBaseArrayLayer(int baseArrayLayer) Initializes the value for thebaseArrayLayerattribute.setBaseMipLevel(int baseMipLevel) Initializes the value for thebaseMipLevelattribute.setLayerCount(int layerCount) Initializes the value for thelayerCountattribute.setLevelCount(int levelCount) Initializes the value for thelevelCountattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageSubresourceRangeTypeinstance. 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 VulkanImageSubresourceRange.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 VulkanImageSubresourceRange.Builder addAllAspectMask(Iterable<VulkanImageAspectFlag> elements) Adds elements toaspectMaskset.- Parameters:
elements- An iterable of aspectMask elements- Returns:
thisbuilder for use in a chained invocation
-
setBaseMipLevel
Initializes the value for thebaseMipLevelattribute.- Parameters:
baseMipLevel- The value for baseMipLevel- Returns:
thisbuilder for use in a chained invocation
-
setLevelCount
Initializes the value for thelevelCountattribute.- Parameters:
levelCount- The value for levelCount- 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 newVulkanImageSubresourceRange.- Returns:
- An immutable instance of VulkanImageSubresourceRange
- Throws:
IllegalStateException- if any required attributes are missing
-