Package com.io7m.waxmill.machines
Class WXMTTYBackendNMDM
java.lang.Object
com.io7m.waxmill.machines.WXMTTYBackendNMDM
- All Implemented Interfaces:
WXMDeviceType.WXMTTYBackendNMDMType,WXMDeviceType.WXMTTYBackendType
public final class WXMTTYBackendNMDM extends java.lang.Object implements WXMDeviceType.WXMTTYBackendNMDMType
Immutable implementation of
WXMDeviceType.WXMTTYBackendNMDMType.
Use the builder to create immutable instances:
WXMTTYBackendNMDM.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMTTYBackendNMDM.BuilderBuilds instances of typeWXMTTYBackendNMDM.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendType
WXMDeviceType.WXMTTYBackendType.Kind -
Method Summary
Modifier and Type Method Description static WXMTTYBackendNMDM.Builderbuilder()Creates a builder forWXMTTYBackendNMDM.java.lang.Stringcomment()static WXMTTYBackendNMDMcopyOf(WXMDeviceType.WXMTTYBackendNMDMType instance)Creates an immutable copy of aWXMDeviceType.WXMTTYBackendNMDMTypevalue.java.lang.Stringdevice()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMTTYBackendNMDMthat have equal attribute values.inthashCode()Computes a hash code from attributes:device,comment.java.lang.StringtoString()Prints the immutable valueWXMTTYBackendNMDMwith attribute values.WXMTTYBackendNMDMwithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMTTYBackendNMDMwithDevice(java.lang.String value)Copy the current immutable object by setting a value for thedeviceattribute.
-
Method Details
-
device
public java.lang.String device()- Specified by:
devicein interfaceWXMDeviceType.WXMTTYBackendNMDMType- Specified by:
devicein interfaceWXMDeviceType.WXMTTYBackendType- Returns:
- The value of the
deviceattribute
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType.WXMTTYBackendNMDMType- 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 ofWXMTTYBackendNMDMthat 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 valueWXMTTYBackendNMDMwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMTTYBackendNMDMTypevalue. 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 WXMTTYBackendNMDM instance
-
builder
Creates a builder forWXMTTYBackendNMDM.WXMTTYBackendNMDM.builder() .setDevice(String) // requireddevice.setComment(String) // optionalcomment.build();- Returns:
- A new WXMTTYBackendNMDM builder
-