Class VulkanSwapChainImageAcquisition

java.lang.Object
com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanSwapChainImageAcquisition
All Implemented Interfaces:
VulkanSwapChainImageAcquisitionType

public final class VulkanSwapChainImageAcquisition extends Object implements VulkanSwapChainImageAcquisitionType
The result of an attempt to acquire an image from the swap chain.
  • Method Details

    • imageIndex

      public OptionalInt imageIndex()
      Specified by:
      imageIndex in interface VulkanSwapChainImageAcquisitionType
      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 return true.
      Specified by:
      subOptimal in interface VulkanSwapChainImageAcquisitionType
      Returns:
      true if the image is now suboptimal
    • timedOut

      public boolean timedOut()
      Specified by:
      timedOut in interface VulkanSwapChainImageAcquisitionType
      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 optional imageIndex attribute.
      Parameters:
      value - The value for imageIndex
      Returns:
      A modified copy of this object
    • withImageIndex

      public final VulkanSwapChainImageAcquisition withImageIndex(OptionalInt optional)
      Copy the current immutable object by setting an optional value for the imageIndex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      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 the subOptimal attribute. A value equality check is used to prevent copying of the same value by returning this.
      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 the timedOut attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for timedOut
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanSwapChainImageAcquisition that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: imageIndex, subOptimal, timedOut.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanSwapChainImageAcquisition with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static VulkanSwapChainImageAcquisition of(OptionalInt imageIndex, boolean subOptimal, boolean timedOut)
      Construct a new immutable VulkanSwapChainImageAcquisition instance.
      Parameters:
      imageIndex - The value for the imageIndex attribute
      subOptimal - The value for the subOptimal attribute
      timedOut - The value for the timedOut attribute
      Returns:
      An immutable VulkanSwapChainImageAcquisition instance
    • copyOf

      Creates an immutable copy of a VulkanSwapChainImageAcquisitionType 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 for VulkanSwapChainImageAcquisition.
       VulkanSwapChainImageAcquisition.builder()
          .setImageIndex(int) // optional imageIndex
          .setSubOptimal(boolean) // required subOptimal
          .setTimedOut(boolean) // required timedOut
          .build();
       
      Returns:
      A new VulkanSwapChainImageAcquisition builder