Class VulkanSurfaceFormatKHR
- java.lang.Object
-
- com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceFormatKHR
-
- All Implemented Interfaces:
VulkanSurfaceFormatKHRType
public final class VulkanSurfaceFormatKHR extends java.lang.Object implements VulkanSurfaceFormatKHRType
- See Also:
- "VkSurfaceFormatKHR"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanSurfaceFormatKHR.Builder
Builds instances of typeVulkanSurfaceFormatKHR
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanSurfaceFormatKHR.Builder
builder()
Creates a builder forVulkanSurfaceFormatKHR
.VulkanColorSpaceKHR
colorSpace()
static VulkanSurfaceFormatKHR
copyOf(VulkanSurfaceFormatKHRType instance)
Creates an immutable copy of aVulkanSurfaceFormatKHRType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSurfaceFormatKHR
that have equal attribute values.VulkanFormat
format()
int
hashCode()
Computes a hash code from attributes:format
,colorSpace
.static VulkanSurfaceFormatKHR
of(VulkanFormat format, VulkanColorSpaceKHR colorSpace)
Construct a new immutableVulkanSurfaceFormatKHR
instance.java.lang.String
toString()
Prints the immutable valueVulkanSurfaceFormatKHR
with attribute values.VulkanSurfaceFormatKHR
withColorSpace(VulkanColorSpaceKHR value)
Copy the current immutable object by setting a value for thecolorSpace
attribute.VulkanSurfaceFormatKHR
withFormat(VulkanFormat value)
Copy the current immutable object by setting a value for theformat
attribute.
-
-
-
Method Detail
-
format
public VulkanFormat format()
- Specified by:
format
in interfaceVulkanSurfaceFormatKHRType
- Returns:
- A format that is compatible with the specified surface.
-
colorSpace
public VulkanColorSpaceKHR colorSpace()
- Specified by:
colorSpace
in interfaceVulkanSurfaceFormatKHRType
- Returns:
- A presentation color space that is compatible with the surface.
-
withFormat
public final VulkanSurfaceFormatKHR withFormat(VulkanFormat value)
Copy the current immutable object by setting a value for theformat
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for format- Returns:
- A modified copy of the
this
object
-
withColorSpace
public final VulkanSurfaceFormatKHR withColorSpace(VulkanColorSpaceKHR value)
Copy the current immutable object by setting a value for thecolorSpace
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for colorSpace- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSurfaceFormatKHR
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:format
,colorSpace
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanSurfaceFormatKHR
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanSurfaceFormatKHR of(VulkanFormat format, VulkanColorSpaceKHR colorSpace)
Construct a new immutableVulkanSurfaceFormatKHR
instance.- Parameters:
format
- The value for theformat
attributecolorSpace
- The value for thecolorSpace
attribute- Returns:
- An immutable VulkanSurfaceFormatKHR instance
-
copyOf
public static VulkanSurfaceFormatKHR copyOf(VulkanSurfaceFormatKHRType instance)
Creates an immutable copy of aVulkanSurfaceFormatKHRType
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 VulkanSurfaceFormatKHR instance
-
builder
public static VulkanSurfaceFormatKHR.Builder builder()
Creates a builder forVulkanSurfaceFormatKHR
.- Returns:
- A new VulkanSurfaceFormatKHR builder
-
-