Class VulkanFormatProperties

java.lang.Object
com.io7m.jcoronado.api.VulkanFormatProperties
All Implemented Interfaces:
VulkanFormatPropertiesType

public final class VulkanFormatProperties extends Object implements VulkanFormatPropertiesType
Structure specifying image format properties.
  • Method Details

    • linearTilingFeatures

      public Set<VulkanFormatFeatureFlag> linearTilingFeatures()
      Specified by:
      linearTilingFeatures in interface VulkanFormatPropertiesType
      Returns:
      A set of flags specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR.
    • optimalTilingFeatures

      public Set<VulkanFormatFeatureFlag> optimalTilingFeatures()
      Specified by:
      optimalTilingFeatures in interface VulkanFormatPropertiesType
      Returns:
      A set of flags specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL.
    • bufferFeatures

      public Set<VulkanFormatFeatureFlag> bufferFeatures()
      Specified by:
      bufferFeatures in interface VulkanFormatPropertiesType
      Returns:
      A set of flags specifying features supported by buffers.
    • withLinearTilingFeatures

      public final VulkanFormatProperties withLinearTilingFeatures(VulkanFormatFeatureFlag... elements)
      Copy the current immutable object with elements that replace the content of linearTilingFeatures.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLinearTilingFeatures

      public final VulkanFormatProperties withLinearTilingFeatures(Iterable<VulkanFormatFeatureFlag> elements)
      Copy the current immutable object with elements that replace the content of linearTilingFeatures. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of linearTilingFeatures elements to set
      Returns:
      A modified copy of this object
    • withOptimalTilingFeatures

      public final VulkanFormatProperties withOptimalTilingFeatures(VulkanFormatFeatureFlag... elements)
      Copy the current immutable object with elements that replace the content of optimalTilingFeatures.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withOptimalTilingFeatures

      public final VulkanFormatProperties withOptimalTilingFeatures(Iterable<VulkanFormatFeatureFlag> elements)
      Copy the current immutable object with elements that replace the content of optimalTilingFeatures. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of optimalTilingFeatures elements to set
      Returns:
      A modified copy of this object
    • withBufferFeatures

      public final VulkanFormatProperties withBufferFeatures(VulkanFormatFeatureFlag... elements)
      Copy the current immutable object with elements that replace the content of bufferFeatures.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBufferFeatures

      public final VulkanFormatProperties withBufferFeatures(Iterable<VulkanFormatFeatureFlag> elements)
      Copy the current immutable object with elements that replace the content of bufferFeatures. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of bufferFeatures elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanFormatProperties 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: linearTilingFeatures, optimalTilingFeatures, bufferFeatures.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanFormatProperties of(Set<VulkanFormatFeatureFlag> linearTilingFeatures, Set<VulkanFormatFeatureFlag> optimalTilingFeatures, Set<VulkanFormatFeatureFlag> bufferFeatures)
      Construct a new immutable VulkanFormatProperties instance.
      Parameters:
      linearTilingFeatures - The value for the linearTilingFeatures attribute
      optimalTilingFeatures - The value for the optimalTilingFeatures attribute
      bufferFeatures - The value for the bufferFeatures attribute
      Returns:
      An immutable VulkanFormatProperties instance
    • of

      public static VulkanFormatProperties of(Iterable<VulkanFormatFeatureFlag> linearTilingFeatures, Iterable<VulkanFormatFeatureFlag> optimalTilingFeatures, Iterable<VulkanFormatFeatureFlag> bufferFeatures)
      Construct a new immutable VulkanFormatProperties instance.
      Parameters:
      linearTilingFeatures - The value for the linearTilingFeatures attribute
      optimalTilingFeatures - The value for the optimalTilingFeatures attribute
      bufferFeatures - The value for the bufferFeatures attribute
      Returns:
      An immutable VulkanFormatProperties instance
    • copyOf

      public static VulkanFormatProperties copyOf(VulkanFormatPropertiesType instance)
      Creates an immutable copy of a VulkanFormatPropertiesType 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 VulkanFormatProperties instance
    • builder

      public static VulkanFormatProperties.Builder builder()
      Creates a builder for VulkanFormatProperties.
       VulkanFormatProperties.builder()
          .addLinearTilingFeatures|addAllLinearTilingFeatures(com.io7m.jcoronado.api.VulkanFormatFeatureFlag) // linearTilingFeatures elements
          .addOptimalTilingFeatures|addAllOptimalTilingFeatures(com.io7m.jcoronado.api.VulkanFormatFeatureFlag) // optimalTilingFeatures elements
          .addBufferFeatures|addAllBufferFeatures(com.io7m.jcoronado.api.VulkanFormatFeatureFlag) // bufferFeatures elements
          .build();
       
      Returns:
      A new VulkanFormatProperties builder