Class VulkanBufferCopy
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferCopy
- All Implemented Interfaces:
VulkanBufferCopyType
Structure specifying a buffer copy operation.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanBufferCopy.Builderbuilder()Creates a builder forVulkanBufferCopy.static VulkanBufferCopycopyOf(VulkanBufferCopyType instance) Creates an immutable copy of aVulkanBufferCopyTypevalue.booleanThis instance is equal to all instances ofVulkanBufferCopythat have equal attribute values.inthashCode()Computes a hash code from attributes:sourceOffset,targetOffset,size.longsize()longlongtoString()Prints the immutable valueVulkanBufferCopywith attribute values.final VulkanBufferCopywithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.final VulkanBufferCopywithSourceOffset(long value) Copy the current immutable object by setting a value for thesourceOffsetattribute.final VulkanBufferCopywithTargetOffset(long value) Copy the current immutable object by setting a value for thetargetOffsetattribute.
-
Method Details
-
sourceOffset
public long sourceOffset()- Specified by:
sourceOffsetin interfaceVulkanBufferCopyType- Returns:
- The starting offset in bytes from the start of the source buffer.
-
targetOffset
public long targetOffset()- Specified by:
targetOffsetin interfaceVulkanBufferCopyType- Returns:
- The starting offset in bytes from the start of the target buffer.
-
size
public long size()- Specified by:
sizein interfaceVulkanBufferCopyType- Returns:
- The number of bytes to copy.
-
withSourceOffset
Copy the current immutable object by setting a value for thesourceOffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sourceOffset- Returns:
- A modified copy or the
thisobject
-
withTargetOffset
Copy the current immutable object by setting a value for thetargetOffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for targetOffset- Returns:
- A modified copy or 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 or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanBufferCopyTypevalue. 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 VulkanBufferCopy instance
-
builder
Creates a builder forVulkanBufferCopy.VulkanBufferCopy.builder() .setSourceOffset(long) // optional
sourceOffset.setTargetOffset(long) // optionaltargetOffset.setSize(long) // optionalsize.build();- Returns:
- A new VulkanBufferCopy builder
-