Class VulkanPhysicalDeviceMemoryProperties.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanPhysicalDeviceMemoryProperties.Builder
- Enclosing class:
VulkanPhysicalDeviceMemoryProperties
Builds instances of type
VulkanPhysicalDeviceMemoryProperties
.
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 TypeMethodDescriptionbuild()
Builds a newVulkanPhysicalDeviceMemoryProperties
.from
(VulkanPhysicalDeviceMemoryPropertiesType instance) Fill a builder with attribute values from the providedVulkanPhysicalDeviceMemoryPropertiesType
instance.Initializes the value for theheaps
attribute.Initializes the value for thetypes
attribute.
-
Method Details
-
from
public final VulkanPhysicalDeviceMemoryProperties.Builder from(VulkanPhysicalDeviceMemoryPropertiesType instance) Fill a builder with attribute values from the providedVulkanPhysicalDeviceMemoryPropertiesType
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setHeaps
public final VulkanPhysicalDeviceMemoryProperties.Builder setHeaps(SortedMap<VulkanMemoryHeapIndex, VulkanMemoryHeap> heaps) Initializes the value for theheaps
attribute.- Parameters:
heaps
- The value for heaps- Returns:
this
builder for use in a chained invocation
-
setTypes
public final VulkanPhysicalDeviceMemoryProperties.Builder setTypes(SortedMap<VulkanMemoryTypeIndex, VulkanMemoryType> types) Initializes the value for thetypes
attribute.- Parameters:
types
- The value for types- Returns:
this
builder for use in a chained invocation
-
build
Builds a newVulkanPhysicalDeviceMemoryProperties
.- Returns:
- An immutable instance of VulkanPhysicalDeviceMemoryProperties
- Throws:
IllegalStateException
- if any required attributes are missing
-