Class VulkanOffset2D.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanOffset2D.Builder
- Enclosing class:
VulkanOffset2D
Builds instances of type
VulkanOffset2D.
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 newVulkanOffset2D.final VulkanOffset2D.Builderfrom(VulkanOffset2DType instance) Fill a builder with attribute values from the providedVulkanOffset2DTypeinstance.final VulkanOffset2D.BuildersetX(int x) Initializes the value for thexattribute.final VulkanOffset2D.BuildersetY(int y) Initializes the value for theyattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanOffset2DTypeinstance. 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
-
setX
Initializes the value for thexattribute.- Parameters:
x- The value for x- Returns:
thisbuilder for use in a chained invocation
-
setY
Initializes the value for theyattribute.- Parameters:
y- The value for y- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanOffset2D.- Returns:
- An immutable instance of VulkanOffset2D
- Throws:
IllegalStateException- if any required attributes are missing
-