Class VulkanBufferCopy.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferCopy.Builder
- Enclosing class:
VulkanBufferCopy
Builds instances of type
VulkanBufferCopy.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newVulkanBufferCopy.final VulkanBufferCopy.Builderfrom(VulkanBufferCopyType instance) Fill a builder with attribute values from the providedVulkanBufferCopyTypeinstance.final VulkanBufferCopy.BuildersetSize(long size) Initializes the value for thesizeattribute.final VulkanBufferCopy.BuildersetSourceOffset(long sourceOffset) Initializes the value for thesourceOffsetattribute.final VulkanBufferCopy.BuildersetTargetOffset(long targetOffset) Initializes the value for thetargetOffsetattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanBufferCopyTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setSourceOffset
Initializes the value for thesourceOffsetattribute.If not set, this attribute will have a default value as returned by the initializer of
sourceOffset.- Parameters:
sourceOffset- The value for sourceOffset- Returns:
thisbuilder for use in a chained invocation
-
setTargetOffset
Initializes the value for thetargetOffsetattribute.If not set, this attribute will have a default value as returned by the initializer of
targetOffset.- Parameters:
targetOffset- The value for targetOffset- Returns:
thisbuilder for use in a chained invocation
-
setSize
-
build
Builds a newVulkanBufferCopy.- Returns:
- An immutable instance of VulkanBufferCopy
- Throws:
IllegalStateException- if any required attributes are missing
-