Package com.io7m.waxmill.machines
Class WXMDevicePassthru.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMDevicePassthru.Builder
- Enclosing class:
- WXMDevicePassthru
public static final class WXMDevicePassthru.Builder
extends java.lang.Object
Builds instances of type
WXMDevicePassthru.
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 WXMDevicePassthrubuild()Builds a newWXMDevicePassthru.WXMDevicePassthru.Builderfrom(WXMDeviceType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceTypeinstance.WXMDevicePassthru.Builderfrom(WXMDeviceType.WXMDevicePassthruType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMDevicePassthruTypeinstance.WXMDevicePassthru.BuildersetComment(java.lang.String comment)Initializes the value for thecommentattribute.WXMDevicePassthru.BuildersetDeviceSlot(WXMDeviceSlot deviceSlot)Initializes the value for thedeviceSlotattribute.WXMDevicePassthru.BuildersetHostPCISlot(WXMDeviceSlot hostPCISlot)Initializes the value for thehostPCISlotattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMDevicePassthruTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setComment
Initializes the value for thecommentattribute.If not set, this attribute will have a default value as returned by the initializer of
comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for use in a chained invocation
-
setDeviceSlot
Initializes the value for thedeviceSlotattribute.- Parameters:
deviceSlot- The value for deviceSlot- Returns:
thisbuilder for use in a chained invocation
-
setHostPCISlot
Initializes the value for thehostPCISlotattribute.- Parameters:
hostPCISlot- The value for hostPCISlot- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMDevicePassthru.- Returns:
- An immutable instance of WXMDevicePassthru
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-