Package com.io7m.waxmill.machines
Class WXMTTYBackendStdio.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMTTYBackendStdio.Builder
- Enclosing class:
- WXMTTYBackendStdio
public static final class WXMTTYBackendStdio.Builder
extends java.lang.Object
Builds instances of type
WXMTTYBackendStdio.
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 WXMTTYBackendStdiobuild()Builds a newWXMTTYBackendStdio.WXMTTYBackendStdio.Builderfrom(WXMDeviceType.WXMTTYBackendStdioType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendStdioTypeinstance.WXMTTYBackendStdio.Builderfrom(WXMDeviceType.WXMTTYBackendType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendTypeinstance.WXMTTYBackendStdio.BuildersetComment(java.lang.String comment)Initializes the value for thecommentattribute.WXMTTYBackendStdio.BuildersetDevice(java.lang.String device)Initializes the value for thedeviceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendTypeinstance.- 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.WXMDeviceType.WXMTTYBackendStdioTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDevice
Initializes the value for thedeviceattribute.- Parameters:
device- The value for device- 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
-
build
Builds a newWXMTTYBackendStdio.- Returns:
- An immutable instance of WXMTTYBackendStdio
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-