- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanImageSubresource
-
- All Implemented Interfaces:
VulkanImageSubresourceType
public final class VulkanImageSubresource extends java.lang.Object implements VulkanImageSubresourceType
Structure specifying an image subresource.- See Also:
- "VkImageSubresource"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanImageSubresource.Builder
Builds instances of typeVulkanImageSubresource
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
arrayLayer()
java.util.Set<VulkanImageAspectFlag>
aspectMask()
static VulkanImageSubresource.Builder
builder()
Creates a builder forVulkanImageSubresource
.static VulkanImageSubresource
copyOf(VulkanImageSubresourceType instance)
Creates an immutable copy of aVulkanImageSubresourceType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageSubresource
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:aspectMask
,mipLevel
,arrayLayer
.int
mipLevel()
static VulkanImageSubresource
of(java.lang.Iterable<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer)
Construct a new immutableVulkanImageSubresource
instance.static VulkanImageSubresource
of(java.util.Set<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer)
Construct a new immutableVulkanImageSubresource
instance.java.lang.String
toString()
Prints the immutable valueVulkanImageSubresource
with attribute values.VulkanImageSubresource
withArrayLayer(int value)
Copy the current immutable object by setting a value for thearrayLayer
attribute.VulkanImageSubresource
withAspectMask(VulkanImageAspectFlag... elements)
Copy the current immutable object with elements that replace the content ofaspectMask
.VulkanImageSubresource
withAspectMask(java.lang.Iterable<VulkanImageAspectFlag> elements)
Copy the current immutable object with elements that replace the content ofaspectMask
.VulkanImageSubresource
withMipLevel(int value)
Copy the current immutable object by setting a value for themipLevel
attribute.
-
-
-
Method Detail
-
aspectMask
public java.util.Set<VulkanImageAspectFlag> aspectMask()
- Specified by:
aspectMask
in interfaceVulkanImageSubresourceType
- Returns:
- A set of flags selecting the image aspect.
-
mipLevel
public int mipLevel()
- Specified by:
mipLevel
in interfaceVulkanImageSubresourceType
- Returns:
- The mipmap level.
-
arrayLayer
public int arrayLayer()
- Specified by:
arrayLayer
in interfaceVulkanImageSubresourceType
- Returns:
- The array layer.
-
withAspectMask
public final VulkanImageSubresource 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 VulkanImageSubresource 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
-
withMipLevel
public final VulkanImageSubresource withMipLevel(int value)
Copy the current immutable object by setting a value for themipLevel
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for mipLevel- Returns:
- A modified copy of the
this
object
-
withArrayLayer
public final VulkanImageSubresource withArrayLayer(int value)
Copy the current immutable object by setting a value for thearrayLayer
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for arrayLayer- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanImageSubresource
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
,mipLevel
,arrayLayer
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanImageSubresource
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanImageSubresource of(java.util.Set<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer)
Construct a new immutableVulkanImageSubresource
instance.- Parameters:
aspectMask
- The value for theaspectMask
attributemipLevel
- The value for themipLevel
attributearrayLayer
- The value for thearrayLayer
attribute- Returns:
- An immutable VulkanImageSubresource instance
-
of
public static VulkanImageSubresource of(java.lang.Iterable<VulkanImageAspectFlag> aspectMask, int mipLevel, int arrayLayer)
Construct a new immutableVulkanImageSubresource
instance.- Parameters:
aspectMask
- The value for theaspectMask
attributemipLevel
- The value for themipLevel
attributearrayLayer
- The value for thearrayLayer
attribute- Returns:
- An immutable VulkanImageSubresource instance
-
copyOf
public static VulkanImageSubresource copyOf(VulkanImageSubresourceType instance)
Creates an immutable copy of aVulkanImageSubresourceType
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 VulkanImageSubresource instance
-
builder
public static VulkanImageSubresource.Builder builder()
Creates a builder forVulkanImageSubresource
.- Returns:
- A new VulkanImageSubresource builder
-
-