Class VulkanMemoryType.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanMemoryType.Builder
- Enclosing class:
VulkanMemoryType
Builds instances of type
VulkanMemoryType.
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 TypeMethodDescriptionfinal VulkanMemoryType.BuilderaddAllFlags(Iterable<VulkanMemoryPropertyFlag> elements) Adds elements toflagsset.final VulkanMemoryType.BuilderaddFlags(VulkanMemoryPropertyFlag element) Adds one element toflagsset.final VulkanMemoryType.BuilderaddFlags(VulkanMemoryPropertyFlag... elements) Adds elements toflagsset.build()Builds a newVulkanMemoryType.final VulkanMemoryType.Builderfrom(VulkanMemoryTypeType instance) Fill a builder with attribute values from the providedVulkanMemoryTypeTypeinstance.final VulkanMemoryType.BuildersetFlags(Iterable<VulkanMemoryPropertyFlag> elements) Sets or replaces all elements forflagsset.final VulkanMemoryType.BuildersetHeapIndex(VulkanMemoryHeapIndex heapIndex) Initializes the value for theheapIndexattribute.final VulkanMemoryType.BuildersetIndex(VulkanMemoryTypeIndex index) Initializes the value for theindexattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanMemoryTypeTypeinstance. 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
-
setIndex
Initializes the value for theindexattribute.- Parameters:
index- The value for index- Returns:
thisbuilder for use in a chained invocation
-
setHeapIndex
Initializes the value for theheapIndexattribute.- Parameters:
heapIndex- The value for heapIndex- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanMemoryType.- Returns:
- An immutable instance of VulkanMemoryType
- Throws:
IllegalStateException- if any required attributes are missing
-