- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanFormatProperties
-
- All Implemented Interfaces:
VulkanFormatPropertiesType
public final class VulkanFormatProperties extends java.lang.Object implements VulkanFormatPropertiesType
Structure specifying image format properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanFormatProperties.Builder
Builds instances of typeVulkanFormatProperties
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<VulkanFormatFeatureFlag>
bufferFeatures()
static VulkanFormatProperties.Builder
builder()
Creates a builder forVulkanFormatProperties
.static VulkanFormatProperties
copyOf(VulkanFormatPropertiesType instance)
Creates an immutable copy of aVulkanFormatPropertiesType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanFormatProperties
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:linearTilingFeatures
,optimalTilingFeatures
,bufferFeatures
.java.util.Set<VulkanFormatFeatureFlag>
linearTilingFeatures()
static VulkanFormatProperties
of(java.lang.Iterable<VulkanFormatFeatureFlag> linearTilingFeatures, java.lang.Iterable<VulkanFormatFeatureFlag> optimalTilingFeatures, java.lang.Iterable<VulkanFormatFeatureFlag> bufferFeatures)
Construct a new immutableVulkanFormatProperties
instance.static VulkanFormatProperties
of(java.util.Set<VulkanFormatFeatureFlag> linearTilingFeatures, java.util.Set<VulkanFormatFeatureFlag> optimalTilingFeatures, java.util.Set<VulkanFormatFeatureFlag> bufferFeatures)
Construct a new immutableVulkanFormatProperties
instance.java.util.Set<VulkanFormatFeatureFlag>
optimalTilingFeatures()
java.lang.String
toString()
Prints the immutable valueVulkanFormatProperties
with attribute values.VulkanFormatProperties
withBufferFeatures(VulkanFormatFeatureFlag... elements)
Copy the current immutable object with elements that replace the content ofbufferFeatures
.VulkanFormatProperties
withBufferFeatures(java.lang.Iterable<VulkanFormatFeatureFlag> elements)
Copy the current immutable object with elements that replace the content ofbufferFeatures
.VulkanFormatProperties
withLinearTilingFeatures(VulkanFormatFeatureFlag... elements)
Copy the current immutable object with elements that replace the content oflinearTilingFeatures
.VulkanFormatProperties
withLinearTilingFeatures(java.lang.Iterable<VulkanFormatFeatureFlag> elements)
Copy the current immutable object with elements that replace the content oflinearTilingFeatures
.VulkanFormatProperties
withOptimalTilingFeatures(VulkanFormatFeatureFlag... elements)
Copy the current immutable object with elements that replace the content ofoptimalTilingFeatures
.VulkanFormatProperties
withOptimalTilingFeatures(java.lang.Iterable<VulkanFormatFeatureFlag> elements)
Copy the current immutable object with elements that replace the content ofoptimalTilingFeatures
.
-
-
-
Method Detail
-
linearTilingFeatures
public java.util.Set<VulkanFormatFeatureFlag> linearTilingFeatures()
- Specified by:
linearTilingFeatures
in interfaceVulkanFormatPropertiesType
- Returns:
- A set of flags specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR.
-
optimalTilingFeatures
public java.util.Set<VulkanFormatFeatureFlag> optimalTilingFeatures()
- Specified by:
optimalTilingFeatures
in interfaceVulkanFormatPropertiesType
- Returns:
- A set of flags specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL.
-
bufferFeatures
public java.util.Set<VulkanFormatFeatureFlag> bufferFeatures()
- Specified by:
bufferFeatures
in interfaceVulkanFormatPropertiesType
- 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 oflinearTilingFeatures
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withLinearTilingFeatures
public final VulkanFormatProperties withLinearTilingFeatures(java.lang.Iterable<VulkanFormatFeatureFlag> elements)
Copy the current immutable object with elements that replace the content oflinearTilingFeatures
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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 ofoptimalTilingFeatures
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withOptimalTilingFeatures
public final VulkanFormatProperties withOptimalTilingFeatures(java.lang.Iterable<VulkanFormatFeatureFlag> elements)
Copy the current immutable object with elements that replace the content ofoptimalTilingFeatures
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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 ofbufferFeatures
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withBufferFeatures
public final VulkanFormatProperties withBufferFeatures(java.lang.Iterable<VulkanFormatFeatureFlag> elements)
Copy the current immutable object with elements that replace the content ofbufferFeatures
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of bufferFeatures elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanFormatProperties
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:linearTilingFeatures
,optimalTilingFeatures
,bufferFeatures
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanFormatProperties
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanFormatProperties of(java.util.Set<VulkanFormatFeatureFlag> linearTilingFeatures, java.util.Set<VulkanFormatFeatureFlag> optimalTilingFeatures, java.util.Set<VulkanFormatFeatureFlag> bufferFeatures)
Construct a new immutableVulkanFormatProperties
instance.- Parameters:
linearTilingFeatures
- The value for thelinearTilingFeatures
attributeoptimalTilingFeatures
- The value for theoptimalTilingFeatures
attributebufferFeatures
- The value for thebufferFeatures
attribute- Returns:
- An immutable VulkanFormatProperties instance
-
of
public static VulkanFormatProperties of(java.lang.Iterable<VulkanFormatFeatureFlag> linearTilingFeatures, java.lang.Iterable<VulkanFormatFeatureFlag> optimalTilingFeatures, java.lang.Iterable<VulkanFormatFeatureFlag> bufferFeatures)
Construct a new immutableVulkanFormatProperties
instance.- Parameters:
linearTilingFeatures
- The value for thelinearTilingFeatures
attributeoptimalTilingFeatures
- The value for theoptimalTilingFeatures
attributebufferFeatures
- The value for thebufferFeatures
attribute- Returns:
- An immutable VulkanFormatProperties instance
-
copyOf
public static VulkanFormatProperties copyOf(VulkanFormatPropertiesType instance)
Creates an immutable copy of aVulkanFormatPropertiesType
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 forVulkanFormatProperties
.- Returns:
- A new VulkanFormatProperties builder
-
-