Class VulkanPhysicalDeviceProperties.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanPhysicalDeviceProperties.Builder
- Enclosing class:
VulkanPhysicalDeviceProperties
Builds instances of type
VulkanPhysicalDeviceProperties.
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 newVulkanPhysicalDeviceProperties.from(VulkanPhysicalDevicePropertiesType instance) Fill a builder with attribute values from the providedVulkanPhysicalDevicePropertiesTypeinstance.setApiVersion(VulkanVersion apiVersion) Initializes the value for theapiVersionattribute.setDriverVersion(VulkanVersion driverVersion) Initializes the value for thedriverVersionattribute.setId(int id) Initializes the value for theidattribute.Initializes the value for thenameattribute.Initializes the value for thetypeattribute.setVendorId(int vendorId) Initializes the value for thevendorIdattribute.
-
Method Details
-
from
public final VulkanPhysicalDeviceProperties.Builder from(VulkanPhysicalDevicePropertiesType instance) Fill a builder with attribute values from the providedVulkanPhysicalDevicePropertiesTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setType
public final VulkanPhysicalDeviceProperties.Builder setType(VulkanPhysicalDevicePropertiesType.Type type) Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
setId
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
setVendorId
Initializes the value for thevendorIdattribute.- Parameters:
vendorId- The value for vendorId- Returns:
thisbuilder for use in a chained invocation
-
setApiVersion
Initializes the value for theapiVersionattribute.- Parameters:
apiVersion- The value for apiVersion- Returns:
thisbuilder for use in a chained invocation
-
setDriverVersion
Initializes the value for thedriverVersionattribute.- Parameters:
driverVersion- The value for driverVersion- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanPhysicalDeviceProperties.- Returns:
- An immutable instance of VulkanPhysicalDeviceProperties
- Throws:
IllegalStateException- if any required attributes are missing
-