Package com.io7m.waxmill.xml.vm.v1
Class WXM1LinuxInitRDDevice
java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1LinuxInitRDDevice
- All Implemented Interfaces:
WXM1LinuxInitRDDeviceType
public final class WXM1LinuxInitRDDevice extends java.lang.Object implements WXM1LinuxInitRDDeviceType
Immutable implementation of
WXM1LinuxInitRDDeviceType.
Use the builder to create immutable instances:
WXM1LinuxInitRDDevice.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXM1LinuxInitRDDevice.BuilderBuilds instances of typeWXM1LinuxInitRDDevice. -
Method Summary
Modifier and Type Method Description static WXM1LinuxInitRDDevice.Builderbuilder()Creates a builder forWXM1LinuxInitRDDevice.static WXM1LinuxInitRDDevicecopyOf(WXM1LinuxInitRDDeviceType instance)Creates an immutable copy of aWXM1LinuxInitRDDeviceTypevalue.WXMDeviceSlotdeviceSlot()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXM1LinuxInitRDDevicethat have equal attribute values.inthashCode()Computes a hash code from attributes:deviceSlot,initRDPath.java.nio.file.PathinitRDPath()java.lang.StringtoString()Prints the immutable valueWXM1LinuxInitRDDevicewith attribute values.WXM1LinuxInitRDDevicewithDeviceSlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for thedeviceSlotattribute.WXM1LinuxInitRDDevicewithInitRDPath(java.nio.file.Path value)Copy the current immutable object by setting a value for theinitRDPathattribute.
-
Method Details
-
deviceSlot
- Specified by:
deviceSlotin interfaceWXM1LinuxInitRDDeviceType- Returns:
- The value of the
deviceSlotattribute
-
initRDPath
public java.nio.file.Path initRDPath()- Specified by:
initRDPathin interfaceWXM1LinuxInitRDDeviceType- Returns:
- The value of the
initRDPathattribute
-
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
-
withInitRDPath
Copy the current immutable object by setting a value for theinitRDPathattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for initRDPath- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXM1LinuxInitRDDevicethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:deviceSlot,initRDPath.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXM1LinuxInitRDDevicewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXM1LinuxInitRDDeviceTypevalue. 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 WXM1LinuxInitRDDevice instance
-
builder
Creates a builder forWXM1LinuxInitRDDevice.WXM1LinuxInitRDDevice.builder() .setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requireddeviceSlot.setInitRDPath(java.nio.file.Path) // requiredinitRDPath.build();- Returns:
- A new WXM1LinuxInitRDDevice builder
-