Class VulkanMemoryType
java.lang.Object
com.io7m.jcoronado.api.VulkanMemoryType
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanMemoryType.Builderbuilder()Creates a builder forVulkanMemoryType.static VulkanMemoryTypecopyOf(VulkanMemoryTypeType instance) Creates an immutable copy of aVulkanMemoryTypeTypevalue.booleanThis instance is equal to all instances ofVulkanMemoryTypethat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:index,heapIndex,flags.index()static VulkanMemoryTypeof(VulkanMemoryTypeIndex index, VulkanMemoryHeapIndex heapIndex, Iterable<VulkanMemoryPropertyFlag> flags) Construct a new immutableVulkanMemoryTypeinstance.static VulkanMemoryTypeof(VulkanMemoryTypeIndex index, VulkanMemoryHeapIndex heapIndex, Set<VulkanMemoryPropertyFlag> flags) Construct a new immutableVulkanMemoryTypeinstance.toString()Prints the immutable valueVulkanMemoryTypewith attribute values.final VulkanMemoryTypewithFlags(VulkanMemoryPropertyFlag... elements) Copy the current immutable object with elements that replace the content offlags.final VulkanMemoryTypewithFlags(Iterable<VulkanMemoryPropertyFlag> elements) Copy the current immutable object with elements that replace the content offlags.final VulkanMemoryTypeCopy the current immutable object by setting a value for theheapIndexattribute.final VulkanMemoryTypewithIndex(VulkanMemoryTypeIndex value) Copy the current immutable object by setting a value for theindexattribute.
-
Method Details
-
index
- Specified by:
indexin interfaceVulkanMemoryTypeType- Returns:
- The type index
-
heapIndex
- Specified by:
heapIndexin interfaceVulkanMemoryTypeType- Returns:
- The memory heap to which this memory type corresponds
-
flags
- Specified by:
flagsin interfaceVulkanMemoryTypeType- Returns:
- The properties of the heap
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
withHeapIndex
Copy the current immutable object by setting a value for theheapIndexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for heapIndex- Returns:
- A modified copy of the
thisobject
-
withFlags
Copy the current immutable object with elements that replace the content offlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFlags
Copy the current immutable object with elements that replace the content offlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of flags elements to set- Returns:
- A modified copy of
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanMemoryType of(VulkanMemoryTypeIndex index, VulkanMemoryHeapIndex heapIndex, Set<VulkanMemoryPropertyFlag> flags) Construct a new immutableVulkanMemoryTypeinstance.- Parameters:
index- The value for theindexattributeheapIndex- The value for theheapIndexattributeflags- The value for theflagsattribute- Returns:
- An immutable VulkanMemoryType instance
-
of
public static VulkanMemoryType of(VulkanMemoryTypeIndex index, VulkanMemoryHeapIndex heapIndex, Iterable<VulkanMemoryPropertyFlag> flags) Construct a new immutableVulkanMemoryTypeinstance.- Parameters:
index- The value for theindexattributeheapIndex- The value for theheapIndexattributeflags- The value for theflagsattribute- Returns:
- An immutable VulkanMemoryType instance
-
copyOf
Creates an immutable copy of aVulkanMemoryTypeTypevalue. 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 VulkanMemoryType instance
-
builder
Creates a builder forVulkanMemoryType.VulkanMemoryType.builder() .setIndex(com.io7m.jcoronado.api.VulkanMemoryTypeIndex) // requiredindex.setHeapIndex(com.io7m.jcoronado.api.VulkanMemoryHeapIndex) // requiredheapIndex.addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanMemoryPropertyFlag) //flagselements .build();- Returns:
- A new VulkanMemoryType builder
-