Package com.io7m.waxmill.machines
Class WXMDeviceE1000
java.lang.Object
com.io7m.waxmill.machines.WXMDeviceE1000
- All Implemented Interfaces:
WXMDeviceType,WXMDeviceType.WXMDeviceE1000Type
public final class WXMDeviceE1000 extends java.lang.Object implements WXMDeviceType.WXMDeviceE1000Type
An emulation of an Intel e82545 network device.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMDeviceE1000.BuilderBuilds instances of typeWXMDeviceE1000.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType
WXMDeviceType.Kind, WXMDeviceType.WXMDeviceAHCIDiskType, WXMDeviceType.WXMDeviceAHCIOpticalDiskType, WXMDeviceType.WXMDeviceE1000Type, WXMDeviceType.WXMDeviceFramebufferType, WXMDeviceType.WXMDeviceHostBridgeType, WXMDeviceType.WXMDeviceLPCType, WXMDeviceType.WXMDevicePassthruType, WXMDeviceType.WXMDeviceVirtioBlockStorageType, WXMDeviceType.WXMDeviceVirtioNetworkType, WXMDeviceType.WXMLPCTTYNames, WXMDeviceType.WXMSectorSizesType, WXMDeviceType.WXMStorageBackendFileType, WXMDeviceType.WXMStorageBackendType, WXMDeviceType.WXMStorageBackendZFSVolumeType, WXMDeviceType.WXMTTYBackendFileType, WXMDeviceType.WXMTTYBackendNMDMType, WXMDeviceType.WXMTTYBackendStdioType, WXMDeviceType.WXMTTYBackendType -
Method Summary
Modifier and Type Method Description WXMNetworkDeviceBackendTypebackend()static WXMDeviceE1000.Builderbuilder()Creates a builder forWXMDeviceE1000.java.lang.Stringcomment()static WXMDeviceE1000copyOf(WXMDeviceType.WXMDeviceE1000Type instance)Creates an immutable copy of aWXMDeviceType.WXMDeviceE1000Typevalue.WXMDeviceSlotdeviceSlot()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMDeviceE1000that have equal attribute values.inthashCode()Computes a hash code from attributes:comment,deviceSlot,backend.java.lang.StringtoString()Prints the immutable valueWXMDeviceE1000with attribute values.WXMDeviceE1000withBackend(WXMNetworkDeviceBackendType value)Copy the current immutable object by setting a value for thebackendattribute.WXMDeviceE1000withComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMDeviceE1000withDeviceSlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for thedeviceSlotattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.waxmill.machines.WXMDeviceType
isConsoleDevice, isStorageDeviceMethods inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceE1000Type
externalName, kind
-
Method Details
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType- Specified by:
commentin interfaceWXMDeviceType.WXMDeviceE1000Type- Returns:
- The value of the
commentattribute
-
deviceSlot
- Specified by:
deviceSlotin interfaceWXMDeviceType- Specified by:
deviceSlotin interfaceWXMDeviceType.WXMDeviceE1000Type- Returns:
- The value of the
deviceSlotattribute
-
backend
- Specified by:
backendin interfaceWXMDeviceType.WXMDeviceE1000Type- Returns:
- The underlying device backend
-
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
-
withDeviceSlot
Copy the current immutable object by setting a value for thedeviceSlotattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deviceSlot- Returns:
- A modified copy of the
thisobject
-
withBackend
Copy the current immutable object by setting a value for thebackendattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for backend- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMDeviceE1000that have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:comment,deviceSlot,backend.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMDeviceE1000with attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMDeviceE1000Typevalue. 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 WXMDeviceE1000 instance
-
builder
Creates a builder forWXMDeviceE1000.WXMDeviceE1000.builder() .setComment(String) // optionalcomment.setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requireddeviceSlot.setBackend(com.io7m.waxmill.machines.WXMNetworkDeviceBackendType) // requiredbackend.build();- Returns:
- A new WXMDeviceE1000 builder
-