- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanBufferCopy
-
- All Implemented Interfaces:
VulkanBufferCopyType
public final class VulkanBufferCopy extends java.lang.Object implements VulkanBufferCopyType
Structure specifying a buffer copy operation.- See Also:
- "VkBufferCopy"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanBufferCopy.Builder
Builds instances of typeVulkanBufferCopy
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanBufferCopy.Builder
builder()
Creates a builder forVulkanBufferCopy
.static VulkanBufferCopy
copyOf(VulkanBufferCopyType instance)
Creates an immutable copy of aVulkanBufferCopyType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanBufferCopy
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sourceOffset
,targetOffset
,size
.static VulkanBufferCopy
of(long sourceOffset, long targetOffset, long size)
Construct a new immutableVulkanBufferCopy
instance.long
size()
long
sourceOffset()
long
targetOffset()
java.lang.String
toString()
Prints the immutable valueVulkanBufferCopy
with attribute values.VulkanBufferCopy
withSize(long value)
Copy the current immutable object by setting a value for thesize
attribute.VulkanBufferCopy
withSourceOffset(long value)
Copy the current immutable object by setting a value for thesourceOffset
attribute.VulkanBufferCopy
withTargetOffset(long value)
Copy the current immutable object by setting a value for thetargetOffset
attribute.
-
-
-
Method Detail
-
sourceOffset
public long sourceOffset()
- Specified by:
sourceOffset
in interfaceVulkanBufferCopyType
- Returns:
- The starting offset in bytes from the start of the source buffer.
-
targetOffset
public long targetOffset()
- Specified by:
targetOffset
in interfaceVulkanBufferCopyType
- Returns:
- The starting offset in bytes from the start of the target buffer.
-
size
public long size()
- Specified by:
size
in interfaceVulkanBufferCopyType
- Returns:
- The number of bytes to copy.
-
withSourceOffset
public final VulkanBufferCopy withSourceOffset(long value)
Copy the current immutable object by setting a value for thesourceOffset
attribute. 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 of the
this
object
-
withTargetOffset
public final VulkanBufferCopy withTargetOffset(long value)
Copy the current immutable object by setting a value for thetargetOffset
attribute. 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 of the
this
object
-
withSize
public final VulkanBufferCopy 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 ofVulkanBufferCopy
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:sourceOffset
,targetOffset
,size
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanBufferCopy
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanBufferCopy of(long sourceOffset, long targetOffset, long size)
Construct a new immutableVulkanBufferCopy
instance.- Parameters:
sourceOffset
- The value for thesourceOffset
attributetargetOffset
- The value for thetargetOffset
attributesize
- The value for thesize
attribute- Returns:
- An immutable VulkanBufferCopy instance
-
copyOf
public static VulkanBufferCopy copyOf(VulkanBufferCopyType instance)
Creates an immutable copy of aVulkanBufferCopyType
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 VulkanBufferCopy instance
-
builder
public static VulkanBufferCopy.Builder builder()
Creates a builder forVulkanBufferCopy
.- Returns:
- A new VulkanBufferCopy builder
-
-