Class VulkanSwapChainImageAcquisition
- java.lang.Object
-
- com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanSwapChainImageAcquisition
-
- All Implemented Interfaces:
VulkanSwapChainImageAcquisitionType
public final class VulkanSwapChainImageAcquisition extends java.lang.Object implements VulkanSwapChainImageAcquisitionType
The result of an attempt to acquire an image from the swap chain.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanSwapChainImageAcquisition.Builder
Builds instances of typeVulkanSwapChainImageAcquisition
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanSwapChainImageAcquisition.Builder
builder()
Creates a builder forVulkanSwapChainImageAcquisition
.static VulkanSwapChainImageAcquisition
copyOf(VulkanSwapChainImageAcquisitionType instance)
Creates an immutable copy of aVulkanSwapChainImageAcquisitionType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSwapChainImageAcquisition
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:imageIndex
,subOptimal
,timedOut
.java.util.OptionalInt
imageIndex()
static VulkanSwapChainImageAcquisition
of(java.util.OptionalInt imageIndex, boolean subOptimal, boolean timedOut)
Construct a new immutableVulkanSwapChainImageAcquisition
instance.boolean
subOptimal()
If an image became available, and the swapchain no longer matches the surface properties exactly but can still be used to present to the surface successfully, this method will returntrue
.boolean
timedOut()
java.lang.String
toString()
Prints the immutable valueVulkanSwapChainImageAcquisition
with attribute values.VulkanSwapChainImageAcquisition
withImageIndex(int value)
Copy the current immutable object by setting a present value for the optionalimageIndex
attribute.VulkanSwapChainImageAcquisition
withImageIndex(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for theimageIndex
attribute.VulkanSwapChainImageAcquisition
withSubOptimal(boolean value)
Copy the current immutable object by setting a value for thesubOptimal
attribute.VulkanSwapChainImageAcquisition
withTimedOut(boolean value)
Copy the current immutable object by setting a value for thetimedOut
attribute.
-
-
-
Method Detail
-
imageIndex
public java.util.OptionalInt imageIndex()
- Specified by:
imageIndex
in interfaceVulkanSwapChainImageAcquisitionType
- Returns:
- The index of the acquired image in the swapchain
-
subOptimal
public boolean subOptimal()
If an image became available, and the swapchain no longer matches the surface properties exactly but can still be used to present to the surface successfully, this method will returntrue
.- Specified by:
subOptimal
in interfaceVulkanSwapChainImageAcquisitionType
- Returns:
true
if the image is now suboptimal
-
timedOut
public boolean timedOut()
- Specified by:
timedOut
in interfaceVulkanSwapChainImageAcquisitionType
- Returns:
true
iff a timeout was specified and no image was available within that time
-
withImageIndex
public final VulkanSwapChainImageAcquisition withImageIndex(int value)
Copy the current immutable object by setting a present value for the optionalimageIndex
attribute.- Parameters:
value
- The value for imageIndex- Returns:
- A modified copy of
this
object
-
withImageIndex
public final VulkanSwapChainImageAcquisition withImageIndex(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for theimageIndex
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for imageIndex- Returns:
- A modified copy of
this
object
-
withSubOptimal
public final VulkanSwapChainImageAcquisition withSubOptimal(boolean value)
Copy the current immutable object by setting a value for thesubOptimal
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for subOptimal- Returns:
- A modified copy of the
this
object
-
withTimedOut
public final VulkanSwapChainImageAcquisition withTimedOut(boolean value)
Copy the current immutable object by setting a value for thetimedOut
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for timedOut- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSwapChainImageAcquisition
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:imageIndex
,subOptimal
,timedOut
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanSwapChainImageAcquisition
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanSwapChainImageAcquisition of(java.util.OptionalInt imageIndex, boolean subOptimal, boolean timedOut)
Construct a new immutableVulkanSwapChainImageAcquisition
instance.- Parameters:
imageIndex
- The value for theimageIndex
attributesubOptimal
- The value for thesubOptimal
attributetimedOut
- The value for thetimedOut
attribute- Returns:
- An immutable VulkanSwapChainImageAcquisition instance
-
copyOf
public static VulkanSwapChainImageAcquisition copyOf(VulkanSwapChainImageAcquisitionType instance)
Creates an immutable copy of aVulkanSwapChainImageAcquisitionType
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 VulkanSwapChainImageAcquisition instance
-
builder
public static VulkanSwapChainImageAcquisition.Builder builder()
Creates a builder forVulkanSwapChainImageAcquisition
.- Returns:
- A new VulkanSwapChainImageAcquisition builder
-
-