Class VulkanSpecializationMapEntry
java.lang.Object
com.io7m.jcoronado.api.VulkanSpecializationMapEntry
- All Implemented Interfaces:
VulkanSpecializationMapEntryType
public final class VulkanSpecializationMapEntry
extends Object
implements VulkanSpecializationMapEntryType
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanSpecializationMapEntry. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanSpecializationMapEntry.intstatic VulkanSpecializationMapEntrycopyOf(VulkanSpecializationMapEntryType instance) Creates an immutable copy of aVulkanSpecializationMapEntryTypevalue.booleanThis instance is equal to all instances ofVulkanSpecializationMapEntrythat have equal attribute values.inthashCode()Computes a hash code from attributes:constantID,offset,size.longoffset()longsize()toString()Prints the immutable valueVulkanSpecializationMapEntrywith attribute values.withConstantID(int value) Copy the current immutable object by setting a value for theconstantIDattribute.withOffset(long value) Copy the current immutable object by setting a value for theoffsetattribute.withSize(long value) Copy the current immutable object by setting a value for thesizeattribute.
-
Method Details
-
constantID
public int constantID()- Specified by:
constantIDin interfaceVulkanSpecializationMapEntryType- Returns:
- The ID of the specialization constant in SPIR-V.
-
offset
public long offset()- Specified by:
offsetin interfaceVulkanSpecializationMapEntryType- Returns:
- The byte offset of the specialization constant value within the supplied data buffer.
-
size
public long size()- Specified by:
sizein interfaceVulkanSpecializationMapEntryType- Returns:
- The byte size of the specialization constant value within the supplied data buffer.
-
withConstantID
Copy the current immutable object by setting a value for theconstantIDattribute. 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 or the
thisobject
-
withOffset
Copy the current immutable object by setting a value for theoffsetattribute. 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 or the
thisobject
-
withSize
Copy the current immutable object by setting a value for thesizeattribute. 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 or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanSpecializationMapEntryTypevalue. 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
Creates a builder forVulkanSpecializationMapEntry.VulkanSpecializationMapEntry.builder() .setConstantID(int) // optional
constantID.setOffset(long) // optionaloffset.setSize(long) // optionalsize.build();- Returns:
- A new VulkanSpecializationMapEntry builder
-