Package com.io7m.waxmill.machines
Class WXMVMNet
java.lang.Object
com.io7m.waxmill.machines.WXMVMNet
- All Implemented Interfaces:
WXMDeviceType.WXMNetworkDeviceBackendType,WXMDeviceType.WXMVMNetType
public final class WXMVMNet extends java.lang.Object implements WXMDeviceType.WXMVMNetType
A vmnet device.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMVMNet.BuilderBuilds instances of typeWXMVMNet.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMNetworkDeviceBackendType
WXMDeviceType.WXMNetworkDeviceBackendType.Kind -
Method Summary
Modifier and Type Method Description WXMMACAddressaddress()static WXMVMNet.Builderbuilder()Creates a builder forWXMVMNet.java.lang.Stringcomment()static WXMVMNetcopyOf(WXMDeviceType.WXMVMNetType instance)Creates an immutable copy of aWXMDeviceType.WXMVMNetTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMVMNetthat have equal attribute values.inthashCode()Computes a hash code from attributes:name,address,comment.WXMVMNetDeviceNamename()java.lang.StringtoString()Prints the immutable valueWXMVMNetwith attribute values.WXMVMNetwithAddress(WXMMACAddress value)Copy the current immutable object by setting a value for theaddressattribute.WXMVMNetwithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMVMNetwithName(WXMVMNetDeviceName value)Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
name
- Specified by:
namein interfaceWXMDeviceType.WXMVMNetType- Returns:
- The underlying device name
-
address
- Specified by:
addressin interfaceWXMDeviceType.WXMVMNetType- Returns:
- The underlying device MAC address
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType.WXMNetworkDeviceBackendType- Specified by:
commentin interfaceWXMDeviceType.WXMVMNetType- Returns:
- The value of the
commentattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withAddress
Copy the current immutable object by setting a value for theaddressattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for address- 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 ofWXMVMNetthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:name,address,comment.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMVMNetwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMVMNetTypevalue. 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 WXMVMNet instance
-
builder
Creates a builder forWXMVMNet.WXMVMNet.builder() .setName(com.io7m.waxmill.machines.WXMVMNetDeviceName) // requiredname.setAddress(com.io7m.waxmill.machines.WXMMACAddress) // requiredaddress.setComment(String) // optionalcomment.build();- Returns:
- A new WXMVMNet builder
-