Package com.io7m.waxmill.machines
Class WXMDeviceAHCIDisk.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMDeviceAHCIDisk.Builder
- Enclosing class:
- WXMDeviceAHCIDisk
public static final class WXMDeviceAHCIDisk.Builder
extends java.lang.Object
Builds instances of type
WXMDeviceAHCIDisk
.
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 WXMDeviceAHCIDisk
build()
Builds a newWXMDeviceAHCIDisk
.WXMDeviceAHCIDisk.Builder
from(WXMDeviceType instance)
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType
instance.WXMDeviceAHCIDisk.Builder
from(WXMDeviceType.WXMDeviceAHCIDiskType instance)
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMDeviceAHCIDiskType
instance.WXMDeviceAHCIDisk.Builder
setBackend(WXMDeviceType.WXMStorageBackendType backend)
Initializes the value for thebackend
attribute.WXMDeviceAHCIDisk.Builder
setComment(java.lang.String comment)
Initializes the value for thecomment
attribute.WXMDeviceAHCIDisk.Builder
setDeviceSlot(WXMDeviceSlot deviceSlot)
Initializes the value for thedeviceSlot
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMDeviceAHCIDiskType
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setDeviceSlot
Initializes the value for thedeviceSlot
attribute.- Parameters:
deviceSlot
- The value for deviceSlot- Returns:
this
builder for use in a chained invocation
-
setComment
Initializes the value for thecomment
attribute.If not set, this attribute will have a default value as returned by the initializer of
comment
.- Parameters:
comment
- The value for comment- Returns:
this
builder for use in a chained invocation
-
setBackend
Initializes the value for thebackend
attribute.- Parameters:
backend
- The value for backend- Returns:
this
builder for use in a chained invocation
-
build
Builds a newWXMDeviceAHCIDisk
.- Returns:
- An immutable instance of WXMDeviceAHCIDisk
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-