- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanSpecializationMapEntry
-
- All Implemented Interfaces:
VulkanSpecializationMapEntryType
public final class VulkanSpecializationMapEntry extends java.lang.Object implements VulkanSpecializationMapEntryType
- See Also:
- "VkSpecializationMapEntry"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanSpecializationMapEntry.Builder
Builds instances of typeVulkanSpecializationMapEntry
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanSpecializationMapEntry.Builder
builder()
Creates a builder forVulkanSpecializationMapEntry
.int
constantID()
static VulkanSpecializationMapEntry
copyOf(VulkanSpecializationMapEntryType instance)
Creates an immutable copy of aVulkanSpecializationMapEntryType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSpecializationMapEntry
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:constantID
,offset
,size
.static VulkanSpecializationMapEntry
of(int constantID, long offset, long size)
Construct a new immutableVulkanSpecializationMapEntry
instance.long
offset()
long
size()
java.lang.String
toString()
Prints the immutable valueVulkanSpecializationMapEntry
with attribute values.VulkanSpecializationMapEntry
withConstantID(int value)
Copy the current immutable object by setting a value for theconstantID
attribute.VulkanSpecializationMapEntry
withOffset(long value)
Copy the current immutable object by setting a value for theoffset
attribute.VulkanSpecializationMapEntry
withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute.
-
-
-
Method Detail
-
constantID
public int constantID()
- Specified by:
constantID
in interfaceVulkanSpecializationMapEntryType
- Returns:
- The ID of the specialization constant in SPIR-V.
-
offset
public long offset()
- Specified by:
offset
in interfaceVulkanSpecializationMapEntryType
- Returns:
- The byte offset of the specialization constant value within the supplied data buffer.
-
size
public long size()
- Specified by:
size
in interfaceVulkanSpecializationMapEntryType
- Returns:
- The byte size of the specialization constant value within the supplied data buffer.
-
withConstantID
public final VulkanSpecializationMapEntry withConstantID(int value)
Copy the current immutable object by setting a value for theconstantID
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for constantID- Returns:
- A modified copy of the
this
object
-
withOffset
public final VulkanSpecializationMapEntry withOffset(long value)
Copy the current immutable object by setting a value for theoffset
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for offset- Returns:
- A modified copy of the
this
object
-
withSize
public final VulkanSpecializationMapEntry withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for size- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSpecializationMapEntry
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:constantID
,offset
,size
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanSpecializationMapEntry
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanSpecializationMapEntry of(int constantID, long offset, long size)
Construct a new immutableVulkanSpecializationMapEntry
instance.- Parameters:
constantID
- The value for theconstantID
attributeoffset
- The value for theoffset
attributesize
- The value for thesize
attribute- Returns:
- An immutable VulkanSpecializationMapEntry instance
-
copyOf
public static VulkanSpecializationMapEntry copyOf(VulkanSpecializationMapEntryType instance)
Creates an immutable copy of aVulkanSpecializationMapEntryType
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 VulkanSpecializationMapEntry instance
-
builder
public static VulkanSpecializationMapEntry.Builder builder()
Creates a builder forVulkanSpecializationMapEntry
.- Returns:
- A new VulkanSpecializationMapEntry builder
-
-