- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageSubresourceRange
-
- All Implemented Interfaces:
VulkanImageSubresourceRangeType
public final class VulkanImageSubresourceRange extends java.lang.Object implements VulkanImageSubresourceRangeType
Structure specifying a image subresource range.- See Also:
- "VkImageSubresourceRange"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanImageSubresourceRange.Builder
Builds instances of typeVulkanImageSubresourceRange
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<VulkanImageAspectFlag>
aspectMask()
int
baseArrayLayer()
int
baseMipLevel()
static VulkanImageSubresourceRange.Builder
builder()
Creates a builder forVulkanImageSubresourceRange
.static VulkanImageSubresourceRange
copyOf(VulkanImageSubresourceRangeType instance)
Creates an immutable copy of aVulkanImageSubresourceRangeType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageSubresourceRange
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:aspectMask
,baseMipLevel
,levelCount
,baseArrayLayer
,layerCount
.int
layerCount()
int
levelCount()
static VulkanImageSubresourceRange
of(java.lang.Iterable<VulkanImageAspectFlag> aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Construct a new immutableVulkanImageSubresourceRange
instance.static VulkanImageSubresourceRange
of(java.util.Set<VulkanImageAspectFlag> aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Construct a new immutableVulkanImageSubresourceRange
instance.java.lang.String
toString()
Prints the immutable valueVulkanImageSubresourceRange
with attribute values.VulkanImageSubresourceRange
withAspectMask(VulkanImageAspectFlag... elements)
Copy the current immutable object with elements that replace the content ofaspectMask
.VulkanImageSubresourceRange
withAspectMask(java.lang.Iterable<VulkanImageAspectFlag> elements)
Copy the current immutable object with elements that replace the content ofaspectMask
.VulkanImageSubresourceRange
withBaseArrayLayer(int value)
Copy the current immutable object by setting a value for thebaseArrayLayer
attribute.VulkanImageSubresourceRange
withBaseMipLevel(int value)
Copy the current immutable object by setting a value for thebaseMipLevel
attribute.VulkanImageSubresourceRange
withLayerCount(int value)
Copy the current immutable object by setting a value for thelayerCount
attribute.VulkanImageSubresourceRange
withLevelCount(int value)
Copy the current immutable object by setting a value for thelevelCount
attribute.
-
-
-
Method Detail
-
aspectMask
public java.util.Set<VulkanImageAspectFlag> aspectMask()
- Specified by:
aspectMask
in interfaceVulkanImageSubresourceRangeType
- Returns:
- The image aspect flags
-
baseMipLevel
public int baseMipLevel()
- Specified by:
baseMipLevel
in interfaceVulkanImageSubresourceRangeType
- Returns:
- The first mipmap level accessible to the view.
-
levelCount
public int levelCount()
- Specified by:
levelCount
in interfaceVulkanImageSubresourceRangeType
- Returns:
- The number of mipmap levels (starting from baseMipLevel) accessible to the view.
-
baseArrayLayer
public int baseArrayLayer()
- Specified by:
baseArrayLayer
in interfaceVulkanImageSubresourceRangeType
- Returns:
- The first array layer accessible to the view.
-
layerCount
public int layerCount()
- Specified by:
layerCount
in interfaceVulkanImageSubresourceRangeType
- Returns:
- The number of array layers (starting from baseArrayLayer) accessible to the view.
-
withAspectMask
public final VulkanImageSubresourceRange withAspectMask(VulkanImageAspectFlag... elements)
Copy the current immutable object with elements that replace the content ofaspectMask
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withAspectMask
public final VulkanImageSubresourceRange withAspectMask(java.lang.Iterable<VulkanImageAspectFlag> elements)
Copy the current immutable object with elements that replace the content ofaspectMask
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of aspectMask elements to set- Returns:
- A modified copy of
this
object
-
withBaseMipLevel
public final VulkanImageSubresourceRange withBaseMipLevel(int value)
Copy the current immutable object by setting a value for thebaseMipLevel
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for baseMipLevel- Returns:
- A modified copy of the
this
object
-
withLevelCount
public final VulkanImageSubresourceRange withLevelCount(int value)
Copy the current immutable object by setting a value for thelevelCount
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for levelCount- Returns:
- A modified copy of the
this
object
-
withBaseArrayLayer
public final VulkanImageSubresourceRange withBaseArrayLayer(int value)
Copy the current immutable object by setting a value for thebaseArrayLayer
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for baseArrayLayer- Returns:
- A modified copy of the
this
object
-
withLayerCount
public final VulkanImageSubresourceRange withLayerCount(int value)
Copy the current immutable object by setting a value for thelayerCount
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for layerCount- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageSubresourceRange
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:aspectMask
,baseMipLevel
,levelCount
,baseArrayLayer
,layerCount
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanImageSubresourceRange
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanImageSubresourceRange of(java.util.Set<VulkanImageAspectFlag> aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Construct a new immutableVulkanImageSubresourceRange
instance.- Parameters:
aspectMask
- The value for theaspectMask
attributebaseMipLevel
- The value for thebaseMipLevel
attributelevelCount
- The value for thelevelCount
attributebaseArrayLayer
- The value for thebaseArrayLayer
attributelayerCount
- The value for thelayerCount
attribute- Returns:
- An immutable VulkanImageSubresourceRange instance
-
of
public static VulkanImageSubresourceRange of(java.lang.Iterable<VulkanImageAspectFlag> aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Construct a new immutableVulkanImageSubresourceRange
instance.- Parameters:
aspectMask
- The value for theaspectMask
attributebaseMipLevel
- The value for thebaseMipLevel
attributelevelCount
- The value for thelevelCount
attributebaseArrayLayer
- The value for thebaseArrayLayer
attributelayerCount
- The value for thelayerCount
attribute- Returns:
- An immutable VulkanImageSubresourceRange instance
-
copyOf
public static VulkanImageSubresourceRange copyOf(VulkanImageSubresourceRangeType instance)
Creates an immutable copy of aVulkanImageSubresourceRangeType
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 VulkanImageSubresourceRange instance
-
builder
public static VulkanImageSubresourceRange.Builder builder()
Creates a builder forVulkanImageSubresourceRange
.- Returns:
- A new VulkanImageSubresourceRange builder
-
-