Package com.io7m.waxmill.machines
Class WXMGRUBKernelOpenBSD
java.lang.Object
com.io7m.waxmill.machines.WXMGRUBKernelOpenBSD
- All Implemented Interfaces:
WXMBootConfigurationType.WXMGRUBKernelInstructionsType,WXMBootConfigurationType.WXMGRUBKernelOpenBSDType
public final class WXMGRUBKernelOpenBSD extends java.lang.Object implements WXMBootConfigurationType.WXMGRUBKernelOpenBSDType
OpenBSD kernel instructions.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMGRUBKernelOpenBSD.BuilderBuilds instances of typeWXMGRUBKernelOpenBSD.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMGRUBKernelInstructionsType
WXMBootConfigurationType.WXMGRUBKernelInstructionsType.Kind -
Method Summary
Modifier and Type Method Description WXMDeviceSlotbootDevice()static WXMGRUBKernelOpenBSD.Builderbuilder()Creates a builder forWXMGRUBKernelOpenBSD.static WXMGRUBKernelOpenBSDcopyOf(WXMBootConfigurationType.WXMGRUBKernelOpenBSDType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMGRUBKernelOpenBSDTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMGRUBKernelOpenBSDthat have equal attribute values.inthashCode()Computes a hash code from attributes:bootDevice,kernelPath.java.nio.file.PathkernelPath()java.lang.StringtoString()Prints the immutable valueWXMGRUBKernelOpenBSDwith attribute values.WXMGRUBKernelOpenBSDwithBootDevice(WXMDeviceSlot value)Copy the current immutable object by setting a value for thebootDeviceattribute.WXMGRUBKernelOpenBSDwithKernelPath(java.nio.file.Path value)Copy the current immutable object by setting a value for thekernelPathattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMGRUBKernelOpenBSDType
checkPreconditions, kind, requiredDevices
-
Method Details
-
bootDevice
- Specified by:
bootDevicein interfaceWXMBootConfigurationType.WXMGRUBKernelOpenBSDType- Returns:
- The device from which booting will occur
-
kernelPath
public java.nio.file.Path kernelPath()- Specified by:
kernelPathin interfaceWXMBootConfigurationType.WXMGRUBKernelOpenBSDType- Returns:
- The path to the kernel on the guest filesystem
-
withBootDevice
Copy the current immutable object by setting a value for thebootDeviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bootDevice- Returns:
- A modified copy of the
thisobject
-
withKernelPath
Copy the current immutable object by setting a value for thekernelPathattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for kernelPath- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMGRUBKernelOpenBSDthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:bootDevice,kernelPath.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMGRUBKernelOpenBSDwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static WXMGRUBKernelOpenBSD copyOf(WXMBootConfigurationType.WXMGRUBKernelOpenBSDType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMGRUBKernelOpenBSDTypevalue. 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 WXMGRUBKernelOpenBSD instance
-
builder
Creates a builder forWXMGRUBKernelOpenBSD.WXMGRUBKernelOpenBSD.builder() .setBootDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // requiredbootDevice.setKernelPath(java.nio.file.Path) // requiredkernelPath.build();- Returns:
- A new WXMGRUBKernelOpenBSD builder
-