Package com.io7m.waxmill.machines
Class WXMTTYBackendStdio
java.lang.Object
com.io7m.waxmill.machines.WXMTTYBackendStdio
- All Implemented Interfaces:
WXMDeviceType.WXMTTYBackendStdioType
,WXMDeviceType.WXMTTYBackendType
public final class WXMTTYBackendStdio extends java.lang.Object implements WXMDeviceType.WXMTTYBackendStdioType
Immutable implementation of
WXMDeviceType.WXMTTYBackendStdioType
.
Use the builder to create immutable instances:
WXMTTYBackendStdio.builder()
.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WXMTTYBackendStdio.Builder
Builds instances of typeWXMTTYBackendStdio
.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendType
WXMDeviceType.WXMTTYBackendType.Kind
-
Method Summary
Modifier and Type Method Description static WXMTTYBackendStdio.Builder
builder()
Creates a builder forWXMTTYBackendStdio
.java.lang.String
comment()
static WXMTTYBackendStdio
copyOf(WXMDeviceType.WXMTTYBackendStdioType instance)
Creates an immutable copy of aWXMDeviceType.WXMTTYBackendStdioType
value.java.lang.String
device()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofWXMTTYBackendStdio
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:device
,comment
.java.lang.String
toString()
Prints the immutable valueWXMTTYBackendStdio
with attribute values.WXMTTYBackendStdio
withComment(java.lang.String value)
Copy the current immutable object by setting a value for thecomment
attribute.WXMTTYBackendStdio
withDevice(java.lang.String value)
Copy the current immutable object by setting a value for thedevice
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendStdioType
kind
-
Method Details
-
device
public java.lang.String device()- Specified by:
device
in interfaceWXMDeviceType.WXMTTYBackendStdioType
- Specified by:
device
in interfaceWXMDeviceType.WXMTTYBackendType
- Returns:
- The value of the
device
attribute
-
comment
public java.lang.String comment()- Specified by:
comment
in interfaceWXMDeviceType.WXMTTYBackendStdioType
- Specified by:
comment
in interfaceWXMDeviceType.WXMTTYBackendType
- Returns:
- The value of the
comment
attribute
-
withDevice
Copy the current immutable object by setting a value for thedevice
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for device- Returns:
- A modified copy of the
this
object
-
withComment
Copy the current immutable object by setting a value for thecomment
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for comment- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMTTYBackendStdio
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:device
,comment
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMTTYBackendStdio
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMTTYBackendStdioType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable WXMTTYBackendStdio instance
-
builder
Creates a builder forWXMTTYBackendStdio
.WXMTTYBackendStdio.builder() .setDevice(String) // required
device
.setComment(String) // optionalcomment
.build();- Returns:
- A new WXMTTYBackendStdio builder
-