Package com.io7m.waxmill.machines
Class WXMDevicePassthru
java.lang.Object
com.io7m.waxmill.machines.WXMDevicePassthru
- All Implemented Interfaces:
WXMDeviceType,WXMDeviceType.WXMDevicePassthruType
public final class WXMDevicePassthru extends java.lang.Object implements WXMDeviceType.WXMDevicePassthruType
A PCI passthru device.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMDevicePassthru.BuilderBuilds instances of typeWXMDevicePassthru.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.WXMNetworkDeviceBackendType, WXMDeviceType.WXMSectorSizesType, WXMDeviceType.WXMStorageBackendFileType, WXMDeviceType.WXMStorageBackendType, WXMDeviceType.WXMStorageBackendZFSVolumeType, WXMDeviceType.WXMTapType, WXMDeviceType.WXMTTYBackendFileType, WXMDeviceType.WXMTTYBackendNMDMType, WXMDeviceType.WXMTTYBackendStdioType, WXMDeviceType.WXMTTYBackendType, WXMDeviceType.WXMVMNetType -
Method Summary
Modifier and Type Method Description static WXMDevicePassthru.Builderbuilder()Creates a builder forWXMDevicePassthru.java.lang.Stringcomment()static WXMDevicePassthrucopyOf(WXMDeviceType.WXMDevicePassthruType instance)Creates an immutable copy of aWXMDeviceType.WXMDevicePassthruTypevalue.WXMDeviceSlotdeviceSlot()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMDevicePassthruthat have equal attribute values.inthashCode()Computes a hash code from attributes:comment,deviceSlot,hostPCISlot.WXMDeviceSlothostPCISlot()java.lang.StringtoString()Prints the immutable valueWXMDevicePassthruwith attribute values.WXMDevicePassthruwithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMDevicePassthruwithDeviceSlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for thedeviceSlotattribute.WXMDevicePassthruwithHostPCISlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for thehostPCISlotattribute.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.WXMDevicePassthruType
externalName, kind
-
Method Details
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType- Specified by:
commentin interfaceWXMDeviceType.WXMDevicePassthruType- Returns:
- The value of the
commentattribute
-
deviceSlot
- Specified by:
deviceSlotin interfaceWXMDeviceType- Specified by:
deviceSlotin interfaceWXMDeviceType.WXMDevicePassthruType- Returns:
- The value of the
deviceSlotattribute
-
hostPCISlot
- Specified by:
hostPCISlotin interfaceWXMDeviceType.WXMDevicePassthruType- Returns:
- The slot containing the host PCI devices
-
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
-
withHostPCISlot
Copy the current immutable object by setting a value for thehostPCISlotattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hostPCISlot- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMDevicePassthruthat 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,hostPCISlot.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMDevicePassthruwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMDevicePassthruTypevalue. 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 WXMDevicePassthru instance
-
builder
Creates a builder forWXMDevicePassthru.WXMDevicePassthru.builder() .setComment(String) // optionalcomment.setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requireddeviceSlot.setHostPCISlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requiredhostPCISlot.build();- Returns:
- A new WXMDevicePassthru builder
-