Class VulkanImageCopy.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageCopy.Builder
- Enclosing class:
VulkanImageCopy
Builds instances of type
VulkanImageCopy.
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 newVulkanImageCopy.final VulkanImageCopy.Builderfrom(VulkanImageCopyType instance) Fill a builder with attribute values from the providedVulkanImageCopyTypeinstance.final VulkanImageCopy.BuildersetExtent(VulkanExtent3D extent) Initializes the value for theextentattribute.final VulkanImageCopy.BuildersetSourceOffset(VulkanOffset3D sourceOffset) Initializes the value for thesourceOffsetattribute.final VulkanImageCopy.BuildersetSourceSubresource(VulkanImageSubresourceLayers sourceSubresource) Initializes the value for thesourceSubresourceattribute.final VulkanImageCopy.BuildersetTargetOffset(VulkanOffset3D targetOffset) Initializes the value for thetargetOffsetattribute.final VulkanImageCopy.BuildersetTargetSubresource(VulkanImageSubresourceLayers targetSubresource) Initializes the value for thetargetSubresourceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageCopyTypeinstance. 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
-
setSourceSubresource
public final VulkanImageCopy.Builder setSourceSubresource(VulkanImageSubresourceLayers sourceSubresource) Initializes the value for thesourceSubresourceattribute.- Parameters:
sourceSubresource- The value for sourceSubresource- 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
-
setTargetSubresource
public final VulkanImageCopy.Builder setTargetSubresource(VulkanImageSubresourceLayers targetSubresource) Initializes the value for thetargetSubresourceattribute.- Parameters:
targetSubresource- The value for targetSubresource- 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
-
setExtent
-
build
Builds a newVulkanImageCopy.- Returns:
- An immutable instance of VulkanImageCopy
- Throws:
IllegalStateException- if any required attributes are missing
-