Module com.io7m.jcoronado.api
Package com.io7m.jcoronado.api
Class VulkanPhysicalDeviceProperties.Builder
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanPhysicalDeviceProperties.Builder
-
- Enclosing class:
- VulkanPhysicalDeviceProperties
public static final class VulkanPhysicalDeviceProperties.Builder extends java.lang.Object
Builds instances of typeVulkanPhysicalDeviceProperties
. Initialize attributes and then invoke thebuild()
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
-
-
-
Method Detail
-
from
public final VulkanPhysicalDeviceProperties.Builder from(VulkanPhysicalDevicePropertiesType instance)
Fill a builder with attribute values from the providedVulkanPhysicalDevicePropertiesType
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
-
setName
public final VulkanPhysicalDeviceProperties.Builder setName(java.lang.String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
setType
public final VulkanPhysicalDeviceProperties.Builder setType(VulkanPhysicalDevicePropertiesType.Type type)
Initializes the value for thetype
attribute.- Parameters:
type
- The value for type- Returns:
this
builder for use in a chained invocation
-
setId
public final VulkanPhysicalDeviceProperties.Builder setId(int id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id- Returns:
this
builder for use in a chained invocation
-
setVendorId
public final VulkanPhysicalDeviceProperties.Builder setVendorId(int vendorId)
Initializes the value for thevendorId
attribute.- Parameters:
vendorId
- The value for vendorId- Returns:
this
builder for use in a chained invocation
-
setApiVersion
public final VulkanPhysicalDeviceProperties.Builder setApiVersion(VulkanVersion apiVersion)
Initializes the value for theapiVersion
attribute.- Parameters:
apiVersion
- The value for apiVersion- Returns:
this
builder for use in a chained invocation
-
setDriverVersion
public final VulkanPhysicalDeviceProperties.Builder setDriverVersion(VulkanVersion driverVersion)
Initializes the value for thedriverVersion
attribute.- Parameters:
driverVersion
- The value for driverVersion- Returns:
this
builder for use in a chained invocation
-
build
public VulkanPhysicalDeviceProperties build()
Builds a newVulkanPhysicalDeviceProperties
.- Returns:
- An immutable instance of VulkanPhysicalDeviceProperties
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-