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 classWXMTTYBackendStdio.BuilderBuilds 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.Builderbuilder()Creates a builder forWXMTTYBackendStdio.java.lang.Stringcomment()static WXMTTYBackendStdiocopyOf(WXMDeviceType.WXMTTYBackendStdioType instance)Creates an immutable copy of aWXMDeviceType.WXMTTYBackendStdioTypevalue.java.lang.Stringdevice()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMTTYBackendStdiothat have equal attribute values.inthashCode()Computes a hash code from attributes:device,comment.java.lang.StringtoString()Prints the immutable valueWXMTTYBackendStdiowith attribute values.WXMTTYBackendStdiowithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMTTYBackendStdiowithDevice(java.lang.String value)Copy the current immutable object by setting a value for thedeviceattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendStdioType
kind
-
Method Details
-
device
public java.lang.String device()- Specified by:
devicein interfaceWXMDeviceType.WXMTTYBackendStdioType- Specified by:
devicein interfaceWXMDeviceType.WXMTTYBackendType- Returns:
- The value of the
deviceattribute
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType.WXMTTYBackendStdioType- Specified by:
commentin interfaceWXMDeviceType.WXMTTYBackendType- Returns:
- The value of the
commentattribute
-
withDevice
Copy the current immutable object by setting a value for thedeviceattribute. 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
thisobject
-
withComment
Copy the current immutable object by setting a value for thecommentattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMTTYBackendStdiothat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:device,comment.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMTTYBackendStdiowith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMTTYBackendStdioTypevalue. 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) // requireddevice.setComment(String) // optionalcomment.build();- Returns:
- A new WXMTTYBackendStdio builder
-