- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanSpecializationMap
-
- All Implemented Interfaces:
VulkanSpecializationMapType
public final class VulkanSpecializationMap extends java.lang.Object implements VulkanSpecializationMapType
- See Also:
- "VkSpecializationMap"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanSpecializationMap.Builder
Builds instances of typeVulkanSpecializationMap
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanSpecializationMap.Builder
builder()
Creates a builder forVulkanSpecializationMap
.static VulkanSpecializationMap
copyOf(VulkanSpecializationMapType instance)
Creates an immutable copy of aVulkanSpecializationMapType
value.java.nio.ByteBuffer
data()
java.util.List<VulkanSpecializationMapEntry>
entries()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSpecializationMap
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:entries
,data
.static VulkanSpecializationMap
of(java.lang.Iterable<? extends VulkanSpecializationMapEntry> entries, java.nio.ByteBuffer data)
Construct a new immutableVulkanSpecializationMap
instance.static VulkanSpecializationMap
of(java.util.List<VulkanSpecializationMapEntry> entries, java.nio.ByteBuffer data)
Construct a new immutableVulkanSpecializationMap
instance.java.lang.String
toString()
Prints the immutable valueVulkanSpecializationMap
with attribute values.VulkanSpecializationMap
withData(java.nio.ByteBuffer value)
Copy the current immutable object by setting a value for thedata
attribute.VulkanSpecializationMap
withEntries(VulkanSpecializationMapEntry... elements)
Copy the current immutable object with elements that replace the content ofentries
.VulkanSpecializationMap
withEntries(java.lang.Iterable<? extends VulkanSpecializationMapEntry> elements)
Copy the current immutable object with elements that replace the content ofentries
.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.jcoronado.api.VulkanSpecializationMapType
checkPreconditions
-
-
-
-
Method Detail
-
entries
public java.util.List<VulkanSpecializationMapEntry> entries()
- Specified by:
entries
in interfaceVulkanSpecializationMapType
- Returns:
- A list of entries mapping constants to offsets in
data
-
data
public java.nio.ByteBuffer data()
- Specified by:
data
in interfaceVulkanSpecializationMapType
- Returns:
- The constant data
-
withEntries
public final VulkanSpecializationMap withEntries(VulkanSpecializationMapEntry... elements)
Copy the current immutable object with elements that replace the content ofentries
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withEntries
public final VulkanSpecializationMap withEntries(java.lang.Iterable<? extends VulkanSpecializationMapEntry> elements)
Copy the current immutable object with elements that replace the content ofentries
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of entries elements to set- Returns:
- A modified copy of
this
object
-
withData
public final VulkanSpecializationMap withData(java.nio.ByteBuffer value)
Copy the current immutable object by setting a value for thedata
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for data- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSpecializationMap
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:entries
,data
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanSpecializationMap
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanSpecializationMap of(java.util.List<VulkanSpecializationMapEntry> entries, java.nio.ByteBuffer data)
Construct a new immutableVulkanSpecializationMap
instance.- Parameters:
entries
- The value for theentries
attributedata
- The value for thedata
attribute- Returns:
- An immutable VulkanSpecializationMap instance
-
of
public static VulkanSpecializationMap of(java.lang.Iterable<? extends VulkanSpecializationMapEntry> entries, java.nio.ByteBuffer data)
Construct a new immutableVulkanSpecializationMap
instance.- Parameters:
entries
- The value for theentries
attributedata
- The value for thedata
attribute- Returns:
- An immutable VulkanSpecializationMap instance
-
copyOf
public static VulkanSpecializationMap copyOf(VulkanSpecializationMapType instance)
Creates an immutable copy of aVulkanSpecializationMapType
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 VulkanSpecializationMap instance
-
builder
public static VulkanSpecializationMap.Builder builder()
Creates a builder forVulkanSpecializationMap
.- Returns:
- A new VulkanSpecializationMap builder
-
-