Class VulkanImageFormatProperties.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageFormatProperties.Builder
- Enclosing class:
VulkanImageFormatProperties
Builds instances of type
VulkanImageFormatProperties.
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 TypeMethodDescriptionaddAllSampleCounts(Iterable<VulkanSampleCountFlag> elements) Adds elements tosampleCountsset.addSampleCounts(VulkanSampleCountFlag element) Adds one element tosampleCountsset.addSampleCounts(VulkanSampleCountFlag... elements) Adds elements tosampleCountsset.build()Builds a newVulkanImageFormatProperties.from(VulkanImageFormatPropertiesType instance) Fill a builder with attribute values from the providedVulkanImageFormatPropertiesTypeinstance.setMaxArrayLayers(int maxArrayLayers) Initializes the value for themaxArrayLayersattribute.setMaxExtent(VulkanExtent3D maxExtent) Initializes the value for themaxExtentattribute.setMaxMipLevels(int maxMipLevels) Initializes the value for themaxMipLevelsattribute.setMaxResourceSize(long maxResourceSize) Initializes the value for themaxResourceSizeattribute.setSampleCounts(Iterable<VulkanSampleCountFlag> elements) Sets or replaces all elements forsampleCountsset.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageFormatPropertiesTypeinstance. 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
-
setMaxExtent
-
setMaxMipLevels
Initializes the value for themaxMipLevelsattribute.If not set, this attribute will have a default value as returned by the initializer of
maxMipLevels.- Parameters:
maxMipLevels- The value for maxMipLevels- Returns:
thisbuilder for use in a chained invocation
-
setMaxArrayLayers
Initializes the value for themaxArrayLayersattribute.If not set, this attribute will have a default value as returned by the initializer of
maxArrayLayers.- Parameters:
maxArrayLayers- The value for maxArrayLayers- Returns:
thisbuilder for use in a chained invocation
-
addSampleCounts
Adds one element tosampleCountsset.- Parameters:
element- A sampleCounts element- Returns:
thisbuilder for use in a chained invocation
-
addSampleCounts
Adds elements tosampleCountsset.- Parameters:
elements- An array of sampleCounts elements- Returns:
thisbuilder for use in a chained invocation
-
setSampleCounts
public final VulkanImageFormatProperties.Builder setSampleCounts(Iterable<VulkanSampleCountFlag> elements) Sets or replaces all elements forsampleCountsset.- Parameters:
elements- An iterable of sampleCounts elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSampleCounts
public final VulkanImageFormatProperties.Builder addAllSampleCounts(Iterable<VulkanSampleCountFlag> elements) Adds elements tosampleCountsset.- Parameters:
elements- An iterable of sampleCounts elements- Returns:
thisbuilder for use in a chained invocation
-
setMaxResourceSize
Initializes the value for themaxResourceSizeattribute.If not set, this attribute will have a default value as returned by the initializer of
maxResourceSize.- Parameters:
maxResourceSize- The value for maxResourceSize- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanImageFormatProperties.- Returns:
- An immutable instance of VulkanImageFormatProperties
- Throws:
IllegalStateException- if any required attributes are missing
-