Class VulkanSpecializationMap.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanSpecializationMap.Builder
- Enclosing class:
VulkanSpecializationMap
Builds instances of type
VulkanSpecializationMap.
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 TypeMethodDescriptionaddAllEntries(Iterable<? extends VulkanSpecializationMapEntry> elements) Adds elements toentrieslist.addEntries(VulkanSpecializationMapEntry element) Adds one element toentrieslist.addEntries(VulkanSpecializationMapEntry... elements) Adds elements toentrieslist.build()Builds a newVulkanSpecializationMap.from(VulkanSpecializationMapType instance) Fill a builder with attribute values from the providedVulkanSpecializationMapTypeinstance.setData(ByteBuffer data) Initializes the value for thedataattribute.setEntries(Iterable<? extends VulkanSpecializationMapEntry> elements) Sets or replaces all elements forentrieslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanSpecializationMapTypeinstance. 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
-
addEntries
Adds one element toentrieslist.- Parameters:
element- A entries element- Returns:
thisbuilder for use in a chained invocation
-
addEntries
Adds elements toentrieslist.- Parameters:
elements- An array of entries elements- Returns:
thisbuilder for use in a chained invocation
-
setEntries
public final VulkanSpecializationMap.Builder setEntries(Iterable<? extends VulkanSpecializationMapEntry> elements) Sets or replaces all elements forentrieslist.- Parameters:
elements- An iterable of entries elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEntries
public final VulkanSpecializationMap.Builder addAllEntries(Iterable<? extends VulkanSpecializationMapEntry> elements) Adds elements toentrieslist.- Parameters:
elements- An iterable of entries elements- Returns:
thisbuilder for use in a chained invocation
-
setData
Initializes the value for thedataattribute.- Parameters:
data- The value for data- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanSpecializationMap.- Returns:
- An immutable instance of VulkanSpecializationMap
- Throws:
IllegalStateException- if any required attributes are missing
-