- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanBufferMemoryBarrier
-
- All Implemented Interfaces:
VulkanBufferMemoryBarrierType
public final class VulkanBufferMemoryBarrier extends java.lang.Object implements VulkanBufferMemoryBarrierType
Structure specifying the parameters of a buffer memory barrier.- See Also:
- "VkBufferMemoryBarrier"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanBufferMemoryBarrier.Builder
Builds instances of typeVulkanBufferMemoryBarrier
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VulkanBufferType
buffer()
static VulkanBufferMemoryBarrier.Builder
builder()
Creates a builder forVulkanBufferMemoryBarrier
.static VulkanBufferMemoryBarrier
copyOf(VulkanBufferMemoryBarrierType instance)
Creates an immutable copy of aVulkanBufferMemoryBarrierType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanBufferMemoryBarrier
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sourceAccessMask
,targetAccessMask
,sourceQueueFamilyIndex
,targetQueueFamilyIndex
,buffer
,offset
,size
.static VulkanBufferMemoryBarrier
of(java.lang.Iterable<VulkanAccessFlag> sourceAccessMask, java.lang.Iterable<VulkanAccessFlag> targetAccessMask, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size)
Construct a new immutableVulkanBufferMemoryBarrier
instance.static VulkanBufferMemoryBarrier
of(java.util.Set<VulkanAccessFlag> sourceAccessMask, java.util.Set<VulkanAccessFlag> targetAccessMask, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size)
Construct a new immutableVulkanBufferMemoryBarrier
instance.long
offset()
long
size()
java.util.Set<VulkanAccessFlag>
sourceAccessMask()
int
sourceQueueFamilyIndex()
java.util.Set<VulkanAccessFlag>
targetAccessMask()
int
targetQueueFamilyIndex()
java.lang.String
toString()
Prints the immutable valueVulkanBufferMemoryBarrier
with attribute values.VulkanBufferMemoryBarrier
withBuffer(VulkanBufferType value)
Copy the current immutable object by setting a value for thebuffer
attribute.VulkanBufferMemoryBarrier
withOffset(long value)
Copy the current immutable object by setting a value for theoffset
attribute.VulkanBufferMemoryBarrier
withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute.VulkanBufferMemoryBarrier
withSourceAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
.VulkanBufferMemoryBarrier
withSourceAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
.VulkanBufferMemoryBarrier
withSourceQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thesourceQueueFamilyIndex
attribute.VulkanBufferMemoryBarrier
withTargetAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
.VulkanBufferMemoryBarrier
withTargetAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
.VulkanBufferMemoryBarrier
withTargetQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thetargetQueueFamilyIndex
attribute.
-
-
-
Method Detail
-
sourceAccessMask
public java.util.Set<VulkanAccessFlag> sourceAccessMask()
- Specified by:
sourceAccessMask
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- The source access mask
-
targetAccessMask
public java.util.Set<VulkanAccessFlag> targetAccessMask()
- Specified by:
targetAccessMask
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- The target access mask
-
sourceQueueFamilyIndex
public int sourceQueueFamilyIndex()
- Specified by:
sourceQueueFamilyIndex
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- The source queue family for a queue family ownership transfer.
-
targetQueueFamilyIndex
public int targetQueueFamilyIndex()
- Specified by:
targetQueueFamilyIndex
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- The target queue family for a queue family ownership transfer.
-
buffer
public VulkanBufferType buffer()
- Specified by:
buffer
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- The buffer affected by this barrier.
-
offset
public long offset()
- Specified by:
offset
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- An offset in bytes into the backing memory for buffer; this is relative to the base offset as bound to the buffer
-
size
public long size()
- Specified by:
size
in interfaceVulkanBufferMemoryBarrierType
- Returns:
- A size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.
-
withSourceAccessMask
public final VulkanBufferMemoryBarrier withSourceAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withSourceAccessMask
public final VulkanBufferMemoryBarrier withSourceAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content ofsourceAccessMask
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of sourceAccessMask elements to set- Returns:
- A modified copy of
this
object
-
withTargetAccessMask
public final VulkanBufferMemoryBarrier withTargetAccessMask(VulkanAccessFlag... elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withTargetAccessMask
public final VulkanBufferMemoryBarrier withTargetAccessMask(java.lang.Iterable<VulkanAccessFlag> elements)
Copy the current immutable object with elements that replace the content oftargetAccessMask
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of targetAccessMask elements to set- Returns:
- A modified copy of
this
object
-
withSourceQueueFamilyIndex
public final VulkanBufferMemoryBarrier withSourceQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thesourceQueueFamilyIndex
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sourceQueueFamilyIndex- Returns:
- A modified copy of the
this
object
-
withTargetQueueFamilyIndex
public final VulkanBufferMemoryBarrier withTargetQueueFamilyIndex(int value)
Copy the current immutable object by setting a value for thetargetQueueFamilyIndex
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetQueueFamilyIndex- Returns:
- A modified copy of the
this
object
-
withBuffer
public final VulkanBufferMemoryBarrier withBuffer(VulkanBufferType value)
Copy the current immutable object by setting a value for thebuffer
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for buffer- Returns:
- A modified copy of the
this
object
-
withOffset
public final VulkanBufferMemoryBarrier withOffset(long value)
Copy the current immutable object by setting a value for theoffset
attribute. 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 of the
this
object
-
withSize
public final VulkanBufferMemoryBarrier withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanBufferMemoryBarrier
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:sourceAccessMask
,targetAccessMask
,sourceQueueFamilyIndex
,targetQueueFamilyIndex
,buffer
,offset
,size
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanBufferMemoryBarrier
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanBufferMemoryBarrier of(java.util.Set<VulkanAccessFlag> sourceAccessMask, java.util.Set<VulkanAccessFlag> targetAccessMask, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size)
Construct a new immutableVulkanBufferMemoryBarrier
instance.- Parameters:
sourceAccessMask
- The value for thesourceAccessMask
attributetargetAccessMask
- The value for thetargetAccessMask
attributesourceQueueFamilyIndex
- The value for thesourceQueueFamilyIndex
attributetargetQueueFamilyIndex
- The value for thetargetQueueFamilyIndex
attributebuffer
- The value for thebuffer
attributeoffset
- The value for theoffset
attributesize
- The value for thesize
attribute- Returns:
- An immutable VulkanBufferMemoryBarrier instance
-
of
public static VulkanBufferMemoryBarrier of(java.lang.Iterable<VulkanAccessFlag> sourceAccessMask, java.lang.Iterable<VulkanAccessFlag> targetAccessMask, int sourceQueueFamilyIndex, int targetQueueFamilyIndex, VulkanBufferType buffer, long offset, long size)
Construct a new immutableVulkanBufferMemoryBarrier
instance.- Parameters:
sourceAccessMask
- The value for thesourceAccessMask
attributetargetAccessMask
- The value for thetargetAccessMask
attributesourceQueueFamilyIndex
- The value for thesourceQueueFamilyIndex
attributetargetQueueFamilyIndex
- The value for thetargetQueueFamilyIndex
attributebuffer
- The value for thebuffer
attributeoffset
- The value for theoffset
attributesize
- The value for thesize
attribute- Returns:
- An immutable VulkanBufferMemoryBarrier instance
-
copyOf
public static VulkanBufferMemoryBarrier copyOf(VulkanBufferMemoryBarrierType instance)
Creates an immutable copy of aVulkanBufferMemoryBarrierType
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 VulkanBufferMemoryBarrier instance
-
builder
public static VulkanBufferMemoryBarrier.Builder builder()
Creates a builder forVulkanBufferMemoryBarrier
.- Returns:
- A new VulkanBufferMemoryBarrier builder
-
-