Class VulkanSpecializationMap

java.lang.Object
com.io7m.jcoronado.api.VulkanSpecializationMap
All Implemented Interfaces:
VulkanSpecializationMapType

public final class VulkanSpecializationMap extends Object implements VulkanSpecializationMapType
See Also:
  • "VkSpecializationMap"
  • Method Details

    • entries

      Specified by:
      entries in interface VulkanSpecializationMapType
      Returns:
      A list of entries mapping constants to offsets in data
    • data

      public ByteBuffer data()
      Specified by:
      data in interface VulkanSpecializationMapType
      Returns:
      The constant data
    • withEntries

      public final VulkanSpecializationMap withEntries(VulkanSpecializationMapEntry... elements)
      Copy the current immutable object with elements that replace the content of entries.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withEntries

      public final VulkanSpecializationMap withEntries(Iterable<? extends VulkanSpecializationMapEntry> elements)
      Copy the current immutable object with elements that replace the content of entries. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of entries elements to set
      Returns:
      A modified copy or this if not changed
    • withData

      public final VulkanSpecializationMap withData(ByteBuffer value)
      Copy the current immutable object by setting a value for the data attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for data
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanSpecializationMap that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: entries, data.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VulkanSpecializationMap with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static VulkanSpecializationMap copyOf(VulkanSpecializationMapType instance)
      Creates an immutable copy of a VulkanSpecializationMapType 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 for VulkanSpecializationMap.
      VulkanSpecializationMap.builder()
         .addEntries|addAllEntries(VulkanSpecializationMapEntry) // entries elements
         .setData(java.nio.ByteBuffer) // required data
         .build();
      
      Returns:
      A new VulkanSpecializationMap builder