Package com.io7m.waxmill.machines
Class WXMDeviceHostBridge
java.lang.Object
com.io7m.waxmill.machines.WXMDeviceHostBridge
- All Implemented Interfaces:
WXMDeviceType,WXMDeviceType.WXMDeviceHostBridgeType
public final class WXMDeviceHostBridge extends java.lang.Object implements WXMDeviceType.WXMDeviceHostBridgeType
Immutable implementation of
WXMDeviceType.WXMDeviceHostBridgeType.
Use the builder to create immutable instances:
WXMDeviceHostBridge.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMDeviceHostBridge.BuilderBuilds instances of typeWXMDeviceHostBridge.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.WXMTTYBackendTypeNested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceHostBridgeType
WXMDeviceType.WXMDeviceHostBridgeType.Vendor -
Method Summary
Modifier and Type Method Description static WXMDeviceHostBridge.Builderbuilder()Creates a builder forWXMDeviceHostBridge.java.lang.Stringcomment()static WXMDeviceHostBridgecopyOf(WXMDeviceType.WXMDeviceHostBridgeType instance)Creates an immutable copy of aWXMDeviceType.WXMDeviceHostBridgeTypevalue.WXMDeviceSlotdeviceSlot()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMDeviceHostBridgethat have equal attribute values.inthashCode()Computes a hash code from attributes:deviceSlot,vendor,comment.java.lang.StringtoString()Prints the immutable valueWXMDeviceHostBridgewith attribute values.WXMDeviceType.WXMDeviceHostBridgeType.Vendorvendor()WXMDeviceHostBridgewithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMDeviceHostBridgewithDeviceSlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for thedeviceSlotattribute.WXMDeviceHostBridgewithVendor(WXMDeviceType.WXMDeviceHostBridgeType.Vendor value)Copy the current immutable object by setting a value for thevendorattribute.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.WXMDeviceHostBridgeType
externalName, kind
-
Method Details
-
deviceSlot
- Specified by:
deviceSlotin interfaceWXMDeviceType- Specified by:
deviceSlotin interfaceWXMDeviceType.WXMDeviceHostBridgeType- Returns:
- The value of the
deviceSlotattribute
-
vendor
- Specified by:
vendorin interfaceWXMDeviceType.WXMDeviceHostBridgeType- Returns:
- The value of the
vendorattribute
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType- Specified by:
commentin interfaceWXMDeviceType.WXMDeviceHostBridgeType- Returns:
- The value of the
commentattribute
-
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
-
withVendor
Copy the current immutable object by setting a value for thevendorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for vendor- 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 ofWXMDeviceHostBridgethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:deviceSlot,vendor,comment.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMDeviceHostBridgewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMDeviceHostBridgeTypevalue. 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 WXMDeviceHostBridge instance
-
builder
Creates a builder forWXMDeviceHostBridge.WXMDeviceHostBridge.builder() .setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requireddeviceSlot.setVendor(com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceHostBridgeType.Vendor) // requiredvendor.setComment(String) // optionalcomment.build();- Returns:
- A new WXMDeviceHostBridge builder
-