Package com.io7m.waxmill.machines
Class WXMVMNet
java.lang.Object
com.io7m.waxmill.machines.WXMVMNet
- All Implemented Interfaces:
WXMNetworkDeviceBackendType,WXMVMNetType
public final class WXMVMNet extends java.lang.Object implements 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.WXMNetworkDeviceBackendType
WXMNetworkDeviceBackendType.Kind -
Method Summary
Modifier and Type Method Description static WXMVMNet.Builderbuilder()Creates a builder forWXMVMNet.java.lang.Stringcomment()static WXMVMNetcopyOf(WXMVMNetType instance)Creates an immutable copy of aWXMVMNetTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMVMNetthat have equal attribute values.java.util.List<WXMInterfaceGroupName>groups()WXMMACAddressguestMAC()inthashCode()Computes a hash code from attributes:name,guestMAC,hostMAC,groups,comment.WXMMACAddresshostMAC()WXMVMNetDeviceNamename()java.lang.StringtoString()Prints the immutable valueWXMVMNetwith attribute values.WXMVMNetwithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMVMNetwithGroups(WXMInterfaceGroupName... elements)Copy the current immutable object with elements that replace the content ofgroups.WXMVMNetwithGroups(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)Copy the current immutable object with elements that replace the content ofgroups.WXMVMNetwithGuestMAC(WXMMACAddress value)Copy the current immutable object by setting a value for theguestMACattribute.WXMVMNetwithHostMAC(WXMMACAddress value)Copy the current immutable object by setting a value for thehostMACattribute.WXMVMNetwithName(WXMVMNetDeviceName value)Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
name
- Specified by:
namein interfaceWXMVMNetType- Returns:
- The underlying device name
-
guestMAC
- Specified by:
guestMACin interfaceWXMNetworkDeviceBackendType- Specified by:
guestMACin interfaceWXMVMNetType- Returns:
- The value of the
guestMACattribute
-
hostMAC
- Specified by:
hostMACin interfaceWXMNetworkDeviceBackendType- Specified by:
hostMACin interfaceWXMVMNetType- Returns:
- The value of the
hostMACattribute
-
groups
- Specified by:
groupsin interfaceWXMNetworkDeviceBackendType- Specified by:
groupsin interfaceWXMVMNetType- Returns:
- The value of the
groupsattribute
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMNetworkDeviceBackendType- Specified by:
commentin interfaceWXMVMNetType- 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
-
withGuestMAC
Copy the current immutable object by setting a value for theguestMACattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for guestMAC- Returns:
- A modified copy of the
thisobject
-
withHostMAC
Copy the current immutable object by setting a value for thehostMACattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hostMAC- Returns:
- A modified copy of the
thisobject
-
withGroups
Copy the current immutable object with elements that replace the content ofgroups.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGroups
Copy the current immutable object with elements that replace the content ofgroups. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of groups elements to set- Returns:
- A modified copy of
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,guestMAC,hostMAC,groups,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 aWXMVMNetTypevalue. 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.setGuestMAC(com.io7m.waxmill.machines.WXMMACAddress) // requiredguestMAC.setHostMAC(com.io7m.waxmill.machines.WXMMACAddress) // requiredhostMAC.addGroups|addAllGroups(WXMInterfaceGroupName) //groupselements .setComment(String) // optionalcomment.build();- Returns:
- A new WXMVMNet builder
-