Class VulkanMemoryHeap
java.lang.Object
com.io7m.jcoronado.api.VulkanMemoryHeap
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanMemoryHeap.Builderbuilder()Creates a builder forVulkanMemoryHeap.static VulkanMemoryHeapcopyOf(VulkanMemoryHeapType instance) Creates an immutable copy of aVulkanMemoryHeapTypevalue.booleanThis instance is equal to all instances ofVulkanMemoryHeapthat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:index,size,flags.index()static VulkanMemoryHeapof(VulkanMemoryHeapIndex index, long size, Iterable<VulkanMemoryHeapFlag> flags) Construct a new immutableVulkanMemoryHeapinstance.static VulkanMemoryHeapof(VulkanMemoryHeapIndex index, long size, Set<VulkanMemoryHeapFlag> flags) Construct a new immutableVulkanMemoryHeapinstance.longsize()toString()Prints the immutable valueVulkanMemoryHeapwith attribute values.final VulkanMemoryHeapwithFlags(VulkanMemoryHeapFlag... elements) Copy the current immutable object with elements that replace the content offlags.final VulkanMemoryHeapwithFlags(Iterable<VulkanMemoryHeapFlag> elements) Copy the current immutable object with elements that replace the content offlags.final VulkanMemoryHeapwithIndex(VulkanMemoryHeapIndex value) Copy the current immutable object by setting a value for theindexattribute.final VulkanMemoryHeapwithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.
-
Method Details
-
index
- Specified by:
indexin interfaceVulkanMemoryHeapType- Returns:
- The heap index
-
size
public long size()- Specified by:
sizein interfaceVulkanMemoryHeapType- Returns:
- The total memory size in bytes in the heap.
-
flags
- Specified by:
flagsin interfaceVulkanMemoryHeapType- Returns:
- The flags for 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
-
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 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 VulkanMemoryHeap of(VulkanMemoryHeapIndex index, long size, Set<VulkanMemoryHeapFlag> flags) Construct a new immutableVulkanMemoryHeapinstance.- Parameters:
index- The value for theindexattributesize- The value for thesizeattributeflags- The value for theflagsattribute- Returns:
- An immutable VulkanMemoryHeap instance
-
of
public static VulkanMemoryHeap of(VulkanMemoryHeapIndex index, long size, Iterable<VulkanMemoryHeapFlag> flags) Construct a new immutableVulkanMemoryHeapinstance.- Parameters:
index- The value for theindexattributesize- The value for thesizeattributeflags- The value for theflagsattribute- Returns:
- An immutable VulkanMemoryHeap instance
-
copyOf
Creates an immutable copy of aVulkanMemoryHeapTypevalue. 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 VulkanMemoryHeap instance
-
builder
Creates a builder forVulkanMemoryHeap.VulkanMemoryHeap.builder() .setIndex(com.io7m.jcoronado.api.VulkanMemoryHeapIndex) // requiredindex.setSize(long) // requiredsize.addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanMemoryHeapFlag) //flagselements .build();- Returns:
- A new VulkanMemoryHeap builder
-