- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageFormatProperties
-
- All Implemented Interfaces:
VulkanImageFormatPropertiesType
public final class VulkanImageFormatProperties extends java.lang.Object implements VulkanImageFormatPropertiesType
Structure specifying image format properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanImageFormatProperties.Builder
Builds instances of typeVulkanImageFormatProperties
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanImageFormatProperties.Builder
builder()
Creates a builder forVulkanImageFormatProperties
.static VulkanImageFormatProperties
copyOf(VulkanImageFormatPropertiesType instance)
Creates an immutable copy of aVulkanImageFormatPropertiesType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageFormatProperties
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:maxExtent
,maxMipLevels
,maxArrayLayers
,sampleCounts
,maxResourceSize
.int
maxArrayLayers()
VulkanExtent3D
maxExtent()
int
maxMipLevels()
long
maxResourceSize()
static VulkanImageFormatProperties
of(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, java.lang.Iterable<VulkanSampleCountFlag> sampleCounts, long maxResourceSize)
Construct a new immutableVulkanImageFormatProperties
instance.static VulkanImageFormatProperties
of(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, java.util.Set<VulkanSampleCountFlag> sampleCounts, long maxResourceSize)
Construct a new immutableVulkanImageFormatProperties
instance.java.util.Set<VulkanSampleCountFlag>
sampleCounts()
java.lang.String
toString()
Prints the immutable valueVulkanImageFormatProperties
with attribute values.VulkanImageFormatProperties
withMaxArrayLayers(int value)
Copy the current immutable object by setting a value for themaxArrayLayers
attribute.VulkanImageFormatProperties
withMaxExtent(VulkanExtent3D value)
Copy the current immutable object by setting a value for themaxExtent
attribute.VulkanImageFormatProperties
withMaxMipLevels(int value)
Copy the current immutable object by setting a value for themaxMipLevels
attribute.VulkanImageFormatProperties
withMaxResourceSize(long value)
Copy the current immutable object by setting a value for themaxResourceSize
attribute.VulkanImageFormatProperties
withSampleCounts(VulkanSampleCountFlag... elements)
Copy the current immutable object with elements that replace the content ofsampleCounts
.VulkanImageFormatProperties
withSampleCounts(java.lang.Iterable<VulkanSampleCountFlag> elements)
Copy the current immutable object with elements that replace the content ofsampleCounts
.
-
-
-
Method Detail
-
maxExtent
public VulkanExtent3D maxExtent()
- Specified by:
maxExtent
in interfaceVulkanImageFormatPropertiesType
- Returns:
- The maximum image dimensions.
-
maxMipLevels
public int maxMipLevels()
- Specified by:
maxMipLevels
in interfaceVulkanImageFormatPropertiesType
- Returns:
- The maximum number of mipmap levels.
-
maxArrayLayers
public int maxArrayLayers()
- Specified by:
maxArrayLayers
in interfaceVulkanImageFormatPropertiesType
- Returns:
- The maximum number of array layers.
-
sampleCounts
public java.util.Set<VulkanSampleCountFlag> sampleCounts()
- Specified by:
sampleCounts
in interfaceVulkanImageFormatPropertiesType
- Returns:
- A set of flags specifying all the supported sample counts for this image
-
maxResourceSize
public long maxResourceSize()
- Specified by:
maxResourceSize
in interfaceVulkanImageFormatPropertiesType
- Returns:
- An upper bound on the total image size in bytes, inclusive of all image subresources.
-
withMaxExtent
public final VulkanImageFormatProperties withMaxExtent(VulkanExtent3D value)
Copy the current immutable object by setting a value for themaxExtent
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maxExtent- Returns:
- A modified copy of the
this
object
-
withMaxMipLevels
public final VulkanImageFormatProperties withMaxMipLevels(int value)
Copy the current immutable object by setting a value for themaxMipLevels
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maxMipLevels- Returns:
- A modified copy of the
this
object
-
withMaxArrayLayers
public final VulkanImageFormatProperties withMaxArrayLayers(int value)
Copy the current immutable object by setting a value for themaxArrayLayers
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maxArrayLayers- Returns:
- A modified copy of the
this
object
-
withSampleCounts
public final VulkanImageFormatProperties withSampleCounts(VulkanSampleCountFlag... elements)
Copy the current immutable object with elements that replace the content ofsampleCounts
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withSampleCounts
public final VulkanImageFormatProperties withSampleCounts(java.lang.Iterable<VulkanSampleCountFlag> elements)
Copy the current immutable object with elements that replace the content ofsampleCounts
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of sampleCounts elements to set- Returns:
- A modified copy of
this
object
-
withMaxResourceSize
public final VulkanImageFormatProperties withMaxResourceSize(long value)
Copy the current immutable object by setting a value for themaxResourceSize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maxResourceSize- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageFormatProperties
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:maxExtent
,maxMipLevels
,maxArrayLayers
,sampleCounts
,maxResourceSize
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanImageFormatProperties
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanImageFormatProperties of(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, java.util.Set<VulkanSampleCountFlag> sampleCounts, long maxResourceSize)
Construct a new immutableVulkanImageFormatProperties
instance.- Parameters:
maxExtent
- The value for themaxExtent
attributemaxMipLevels
- The value for themaxMipLevels
attributemaxArrayLayers
- The value for themaxArrayLayers
attributesampleCounts
- The value for thesampleCounts
attributemaxResourceSize
- The value for themaxResourceSize
attribute- Returns:
- An immutable VulkanImageFormatProperties instance
-
of
public static VulkanImageFormatProperties of(VulkanExtent3D maxExtent, int maxMipLevels, int maxArrayLayers, java.lang.Iterable<VulkanSampleCountFlag> sampleCounts, long maxResourceSize)
Construct a new immutableVulkanImageFormatProperties
instance.- Parameters:
maxExtent
- The value for themaxExtent
attributemaxMipLevels
- The value for themaxMipLevels
attributemaxArrayLayers
- The value for themaxArrayLayers
attributesampleCounts
- The value for thesampleCounts
attributemaxResourceSize
- The value for themaxResourceSize
attribute- Returns:
- An immutable VulkanImageFormatProperties instance
-
copyOf
public static VulkanImageFormatProperties copyOf(VulkanImageFormatPropertiesType instance)
Creates an immutable copy of aVulkanImageFormatPropertiesType
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 VulkanImageFormatProperties instance
-
builder
public static VulkanImageFormatProperties.Builder builder()
Creates a builder forVulkanImageFormatProperties
.- Returns:
- A new VulkanImageFormatProperties builder
-
-