Class VulkanFormatProperties.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanFormatProperties.Builder
- Enclosing class:
VulkanFormatProperties
Builds instances of type
VulkanFormatProperties
.
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 TypeMethodDescriptionaddAllBufferFeatures
(Iterable<VulkanFormatFeatureFlag> elements) Adds elements tobufferFeatures
set.Adds elements tolinearTilingFeatures
set.Adds elements tooptimalTilingFeatures
set.addBufferFeatures
(VulkanFormatFeatureFlag element) Adds one element tobufferFeatures
set.addBufferFeatures
(VulkanFormatFeatureFlag... elements) Adds elements tobufferFeatures
set.Adds one element tolinearTilingFeatures
set.addLinearTilingFeatures
(VulkanFormatFeatureFlag... elements) Adds elements tolinearTilingFeatures
set.Adds one element tooptimalTilingFeatures
set.addOptimalTilingFeatures
(VulkanFormatFeatureFlag... elements) Adds elements tooptimalTilingFeatures
set.build()
Builds a newVulkanFormatProperties
.from
(VulkanFormatPropertiesType instance) Fill a builder with attribute values from the providedVulkanFormatPropertiesType
instance.setBufferFeatures
(Iterable<VulkanFormatFeatureFlag> elements) Sets or replaces all elements forbufferFeatures
set.Sets or replaces all elements forlinearTilingFeatures
set.Sets or replaces all elements foroptimalTilingFeatures
set.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanFormatPropertiesType
instance. 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:
this
builder for use in a chained invocation
-
addLinearTilingFeatures
public final VulkanFormatProperties.Builder addLinearTilingFeatures(VulkanFormatFeatureFlag element) Adds one element tolinearTilingFeatures
set.- Parameters:
element
- A linearTilingFeatures element- Returns:
this
builder for use in a chained invocation
-
addLinearTilingFeatures
public final VulkanFormatProperties.Builder addLinearTilingFeatures(VulkanFormatFeatureFlag... elements) Adds elements tolinearTilingFeatures
set.- Parameters:
elements
- An array of linearTilingFeatures elements- Returns:
this
builder for use in a chained invocation
-
setLinearTilingFeatures
public final VulkanFormatProperties.Builder setLinearTilingFeatures(Iterable<VulkanFormatFeatureFlag> elements) Sets or replaces all elements forlinearTilingFeatures
set.- Parameters:
elements
- An iterable of linearTilingFeatures elements- Returns:
this
builder for use in a chained invocation
-
addAllLinearTilingFeatures
public final VulkanFormatProperties.Builder addAllLinearTilingFeatures(Iterable<VulkanFormatFeatureFlag> elements) Adds elements tolinearTilingFeatures
set.- Parameters:
elements
- An iterable of linearTilingFeatures elements- Returns:
this
builder for use in a chained invocation
-
addOptimalTilingFeatures
public final VulkanFormatProperties.Builder addOptimalTilingFeatures(VulkanFormatFeatureFlag element) Adds one element tooptimalTilingFeatures
set.- Parameters:
element
- A optimalTilingFeatures element- Returns:
this
builder for use in a chained invocation
-
addOptimalTilingFeatures
public final VulkanFormatProperties.Builder addOptimalTilingFeatures(VulkanFormatFeatureFlag... elements) Adds elements tooptimalTilingFeatures
set.- Parameters:
elements
- An array of optimalTilingFeatures elements- Returns:
this
builder for use in a chained invocation
-
setOptimalTilingFeatures
public final VulkanFormatProperties.Builder setOptimalTilingFeatures(Iterable<VulkanFormatFeatureFlag> elements) Sets or replaces all elements foroptimalTilingFeatures
set.- Parameters:
elements
- An iterable of optimalTilingFeatures elements- Returns:
this
builder for use in a chained invocation
-
addAllOptimalTilingFeatures
public final VulkanFormatProperties.Builder addAllOptimalTilingFeatures(Iterable<VulkanFormatFeatureFlag> elements) Adds elements tooptimalTilingFeatures
set.- Parameters:
elements
- An iterable of optimalTilingFeatures elements- Returns:
this
builder for use in a chained invocation
-
addBufferFeatures
Adds one element tobufferFeatures
set.- Parameters:
element
- A bufferFeatures element- Returns:
this
builder for use in a chained invocation
-
addBufferFeatures
Adds elements tobufferFeatures
set.- Parameters:
elements
- An array of bufferFeatures elements- Returns:
this
builder for use in a chained invocation
-
setBufferFeatures
public final VulkanFormatProperties.Builder setBufferFeatures(Iterable<VulkanFormatFeatureFlag> elements) Sets or replaces all elements forbufferFeatures
set.- Parameters:
elements
- An iterable of bufferFeatures elements- Returns:
this
builder for use in a chained invocation
-
addAllBufferFeatures
public final VulkanFormatProperties.Builder addAllBufferFeatures(Iterable<VulkanFormatFeatureFlag> elements) Adds elements tobufferFeatures
set.- Parameters:
elements
- An iterable of bufferFeatures elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newVulkanFormatProperties
.- Returns:
- An immutable instance of VulkanFormatProperties
- Throws:
IllegalStateException
- if any required attributes are missing
-