- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanPhysicalDeviceProperties
-
- All Implemented Interfaces:
VulkanPhysicalDevicePropertiesType
public final class VulkanPhysicalDeviceProperties extends java.lang.Object implements VulkanPhysicalDevicePropertiesType
The basic properties of a device.- See Also:
- "VkPhysicalDeviceProperties"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanPhysicalDeviceProperties.Builder
Builds instances of typeVulkanPhysicalDeviceProperties
.-
Nested classes/interfaces inherited from interface com.io7m.jcoronado.api.VulkanPhysicalDevicePropertiesType
VulkanPhysicalDevicePropertiesType.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VulkanVersion
apiVersion()
static VulkanPhysicalDeviceProperties.Builder
builder()
Creates a builder forVulkanPhysicalDeviceProperties
.static VulkanPhysicalDeviceProperties
copyOf(VulkanPhysicalDevicePropertiesType instance)
Creates an immutable copy of aVulkanPhysicalDevicePropertiesType
value.VulkanVersion
driverVersion()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanPhysicalDeviceProperties
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:name
,type
,id
,vendorId
,apiVersion
,driverVersion
.int
id()
java.lang.String
name()
static VulkanPhysicalDeviceProperties
of(java.lang.String name, VulkanPhysicalDevicePropertiesType.Type type, int id, int vendorId, VulkanVersion apiVersion, VulkanVersion driverVersion)
Construct a new immutableVulkanPhysicalDeviceProperties
instance.java.lang.String
toString()
Prints the immutable valueVulkanPhysicalDeviceProperties
with attribute values.VulkanPhysicalDevicePropertiesType.Type
type()
int
vendorId()
VulkanPhysicalDeviceProperties
withApiVersion(VulkanVersion value)
Copy the current immutable object by setting a value for theapiVersion
attribute.VulkanPhysicalDeviceProperties
withDriverVersion(VulkanVersion value)
Copy the current immutable object by setting a value for thedriverVersion
attribute.VulkanPhysicalDeviceProperties
withId(int value)
Copy the current immutable object by setting a value for theid
attribute.VulkanPhysicalDeviceProperties
withName(java.lang.String value)
Copy the current immutable object by setting a value for thename
attribute.VulkanPhysicalDeviceProperties
withType(VulkanPhysicalDevicePropertiesType.Type value)
Copy the current immutable object by setting a value for thetype
attribute.VulkanPhysicalDeviceProperties
withVendorId(int value)
Copy the current immutable object by setting a value for thevendorId
attribute.
-
-
-
Method Detail
-
name
public java.lang.String name()
- Specified by:
name
in interfaceVulkanPhysicalDevicePropertiesType
- Returns:
- The device name
-
type
public VulkanPhysicalDevicePropertiesType.Type type()
- Specified by:
type
in interfaceVulkanPhysicalDevicePropertiesType
- Returns:
- The device type
-
id
public int id()
- Specified by:
id
in interfaceVulkanPhysicalDevicePropertiesType
- Returns:
- The device ID (unique for a specific vendor)
-
vendorId
public int vendorId()
- Specified by:
vendorId
in interfaceVulkanPhysicalDevicePropertiesType
- Returns:
- The vendor ID
-
apiVersion
public VulkanVersion apiVersion()
- Specified by:
apiVersion
in interfaceVulkanPhysicalDevicePropertiesType
- Returns:
- The highest version of Vulkan supported
-
driverVersion
public VulkanVersion driverVersion()
- Specified by:
driverVersion
in interfaceVulkanPhysicalDevicePropertiesType
- Returns:
- The version of the underlying device driver
-
withName
public final VulkanPhysicalDeviceProperties withName(java.lang.String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withType
public final VulkanPhysicalDeviceProperties withType(VulkanPhysicalDevicePropertiesType.Type value)
Copy the current immutable object by setting a value for thetype
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for type- Returns:
- A modified copy of the
this
object
-
withId
public final VulkanPhysicalDeviceProperties withId(int value)
Copy the current immutable object by setting a value for theid
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withVendorId
public final VulkanPhysicalDeviceProperties withVendorId(int value)
Copy the current immutable object by setting a value for thevendorId
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for vendorId- Returns:
- A modified copy of the
this
object
-
withApiVersion
public final VulkanPhysicalDeviceProperties withApiVersion(VulkanVersion value)
Copy the current immutable object by setting a value for theapiVersion
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for apiVersion- Returns:
- A modified copy of the
this
object
-
withDriverVersion
public final VulkanPhysicalDeviceProperties withDriverVersion(VulkanVersion value)
Copy the current immutable object by setting a value for thedriverVersion
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for driverVersion- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanPhysicalDeviceProperties
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:name
,type
,id
,vendorId
,apiVersion
,driverVersion
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanPhysicalDeviceProperties
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanPhysicalDeviceProperties of(java.lang.String name, VulkanPhysicalDevicePropertiesType.Type type, int id, int vendorId, VulkanVersion apiVersion, VulkanVersion driverVersion)
Construct a new immutableVulkanPhysicalDeviceProperties
instance.- Parameters:
name
- The value for thename
attributetype
- The value for thetype
attributeid
- The value for theid
attributevendorId
- The value for thevendorId
attributeapiVersion
- The value for theapiVersion
attributedriverVersion
- The value for thedriverVersion
attribute- Returns:
- An immutable VulkanPhysicalDeviceProperties instance
-
copyOf
public static VulkanPhysicalDeviceProperties copyOf(VulkanPhysicalDevicePropertiesType instance)
Creates an immutable copy of aVulkanPhysicalDevicePropertiesType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable VulkanPhysicalDeviceProperties instance
-
builder
public static VulkanPhysicalDeviceProperties.Builder builder()
Creates a builder forVulkanPhysicalDeviceProperties
.- Returns:
- A new VulkanPhysicalDeviceProperties builder
-
-