- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanAttachmentReference
-
- All Implemented Interfaces:
VulkanAttachmentReferenceType
public final class VulkanAttachmentReference extends java.lang.Object implements VulkanAttachmentReferenceType
Structure specifying an attachment reference.- See Also:
- "VkAttachmentReference"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanAttachmentReference.Builder
Builds instances of typeVulkanAttachmentReference
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
attachment()
static VulkanAttachmentReference.Builder
builder()
Creates a builder forVulkanAttachmentReference
.static VulkanAttachmentReference
copyOf(VulkanAttachmentReferenceType instance)
Creates an immutable copy of aVulkanAttachmentReferenceType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanAttachmentReference
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:attachment
,layout
.VulkanImageLayout
layout()
static VulkanAttachmentReference
of(int attachment, VulkanImageLayout layout)
Construct a new immutableVulkanAttachmentReference
instance.java.lang.String
toString()
Prints the immutable valueVulkanAttachmentReference
with attribute values.VulkanAttachmentReference
withAttachment(int value)
Copy the current immutable object by setting a value for theattachment
attribute.VulkanAttachmentReference
withLayout(VulkanImageLayout value)
Copy the current immutable object by setting a value for thelayout
attribute.
-
-
-
Method Detail
-
attachment
public int attachment()
- Specified by:
attachment
in interfaceVulkanAttachmentReferenceType
- Returns:
- The index of the attachment of the render pass
-
layout
public VulkanImageLayout layout()
- Specified by:
layout
in interfaceVulkanAttachmentReferenceType
- Returns:
- The layout the attachment uses during the subpass.
-
withAttachment
public final VulkanAttachmentReference withAttachment(int value)
Copy the current immutable object by setting a value for theattachment
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for attachment- Returns:
- A modified copy of the
this
object
-
withLayout
public final VulkanAttachmentReference withLayout(VulkanImageLayout value)
Copy the current immutable object by setting a value for thelayout
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for layout- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanAttachmentReference
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:attachment
,layout
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanAttachmentReference
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanAttachmentReference of(int attachment, VulkanImageLayout layout)
Construct a new immutableVulkanAttachmentReference
instance.- Parameters:
attachment
- The value for theattachment
attributelayout
- The value for thelayout
attribute- Returns:
- An immutable VulkanAttachmentReference instance
-
copyOf
public static VulkanAttachmentReference copyOf(VulkanAttachmentReferenceType instance)
Creates an immutable copy of aVulkanAttachmentReferenceType
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 VulkanAttachmentReference instance
-
builder
public static VulkanAttachmentReference.Builder builder()
Creates a builder forVulkanAttachmentReference
.- Returns:
- A new VulkanAttachmentReference builder
-
-