Package com.io7m.waxmill.machines
Class WXMGRUBKernelOpenBSD.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMGRUBKernelOpenBSD.Builder
- Enclosing class:
- WXMGRUBKernelOpenBSD
public static final class WXMGRUBKernelOpenBSD.Builder
extends java.lang.Object
Builds instances of type
WXMGRUBKernelOpenBSD.
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 Type Method Description WXMGRUBKernelOpenBSDbuild()Builds a newWXMGRUBKernelOpenBSD.WXMGRUBKernelOpenBSD.Builderfrom(WXMBootConfigurationType.WXMGRUBKernelOpenBSDType instance)Fill a builder with attribute values from the providedWXMGRUBKernelOpenBSDTypeinstance.WXMGRUBKernelOpenBSD.BuildersetBootDevice(WXMDeviceSlot bootDevice)Initializes the value for thebootDeviceattribute.WXMGRUBKernelOpenBSD.BuildersetKernelPath(java.nio.file.Path kernelPath)Initializes the value for thekernelPathattribute.
-
Method Details
-
from
public final WXMGRUBKernelOpenBSD.Builder from(WXMBootConfigurationType.WXMGRUBKernelOpenBSDType instance)Fill a builder with attribute values from the providedWXMGRUBKernelOpenBSDTypeinstance. 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
-
setBootDevice
Initializes the value for thebootDeviceattribute.- Parameters:
bootDevice- The value for bootDevice- Returns:
thisbuilder for use in a chained invocation
-
setKernelPath
Initializes the value for thekernelPathattribute.- Parameters:
kernelPath- The value for kernelPath- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMGRUBKernelOpenBSD.- Returns:
- An immutable instance of WXMGRUBKernelOpenBSD
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-