Package com.io7m.waxmill.machines
Class WXMGRUBKernelLinux
java.lang.Object
com.io7m.waxmill.machines.WXMGRUBKernelLinux
- All Implemented Interfaces:
WXMBootConfigurationType.WXMGRUBKernelInstructionsType,WXMBootConfigurationType.WXMGRUBKernelLinuxType
public final class WXMGRUBKernelLinux extends java.lang.Object implements WXMBootConfigurationType.WXMGRUBKernelLinuxType
Linux kernel instructions.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMGRUBKernelLinux.BuilderBuilds instances of typeWXMGRUBKernelLinux.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMGRUBKernelInstructionsType
WXMBootConfigurationType.WXMGRUBKernelInstructionsType.Kind -
Method Summary
Modifier and Type Method Description static WXMGRUBKernelLinux.Builderbuilder()Creates a builder forWXMGRUBKernelLinux.static WXMGRUBKernelLinuxcopyOf(WXMBootConfigurationType.WXMGRUBKernelLinuxType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMGRUBKernelLinuxTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMGRUBKernelLinuxthat have equal attribute values.inthashCode()Computes a hash code from attributes:kernelDevice,kernelPath,kernelArguments,initRDDevice,initRDPath.WXMDeviceSlotinitRDDevice()java.nio.file.PathinitRDPath()java.util.List<java.lang.String>kernelArguments()WXMDeviceSlotkernelDevice()java.nio.file.PathkernelPath()java.lang.StringtoString()Prints the immutable valueWXMGRUBKernelLinuxwith attribute values.WXMGRUBKernelLinuxwithInitRDDevice(WXMDeviceSlot value)Copy the current immutable object by setting a value for theinitRDDeviceattribute.WXMGRUBKernelLinuxwithInitRDPath(java.nio.file.Path value)Copy the current immutable object by setting a value for theinitRDPathattribute.WXMGRUBKernelLinuxwithKernelArguments(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofkernelArguments.WXMGRUBKernelLinuxwithKernelArguments(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofkernelArguments.WXMGRUBKernelLinuxwithKernelDevice(WXMDeviceSlot value)Copy the current immutable object by setting a value for thekernelDeviceattribute.WXMGRUBKernelLinuxwithKernelPath(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.WXMGRUBKernelLinuxType
checkPreconditions, kind, requiredDevices
-
Method Details
-
kernelDevice
- Specified by:
kernelDevicein interfaceWXMBootConfigurationType.WXMGRUBKernelLinuxType- Returns:
- The device that contains the kernel
-
kernelPath
public java.nio.file.Path kernelPath()- Specified by:
kernelPathin interfaceWXMBootConfigurationType.WXMGRUBKernelLinuxType- Returns:
- The path to the kernel on the guest filesystem
-
kernelArguments
public java.util.List<java.lang.String> kernelArguments()- Specified by:
kernelArgumentsin interfaceWXMBootConfigurationType.WXMGRUBKernelLinuxType- Returns:
- The arguments for the kernel
-
initRDDevice
- Specified by:
initRDDevicein interfaceWXMBootConfigurationType.WXMGRUBKernelLinuxType- Returns:
- The device that contains the initial ramdisk
-
initRDPath
public java.nio.file.Path initRDPath()- Specified by:
initRDPathin interfaceWXMBootConfigurationType.WXMGRUBKernelLinuxType- Returns:
- The path to the initial ramdisk on the guest filesystem
-
withKernelDevice
Copy the current immutable object by setting a value for thekernelDeviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for kernelDevice- 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
-
withKernelArguments
Copy the current immutable object with elements that replace the content ofkernelArguments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withKernelArguments
Copy the current immutable object with elements that replace the content ofkernelArguments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of kernelArguments elements to set- Returns:
- A modified copy of
thisobject
-
withInitRDDevice
Copy the current immutable object by setting a value for theinitRDDeviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for initRDDevice- 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 ofWXMGRUBKernelLinuxthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:kernelDevice,kernelPath,kernelArguments,initRDDevice,initRDPath.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMGRUBKernelLinuxwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMBootConfigurationType.WXMGRUBKernelLinuxTypevalue. 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 WXMGRUBKernelLinux instance
-
builder
Creates a builder forWXMGRUBKernelLinux.WXMGRUBKernelLinux.builder() .setKernelDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // requiredkernelDevice.setKernelPath(java.nio.file.Path) // requiredkernelPath.addKernelArguments|addAllKernelArguments(String) //kernelArgumentselements .setInitRDDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // requiredinitRDDevice.setInitRDPath(java.nio.file.Path) // requiredinitRDPath.build();- Returns:
- A new WXMGRUBKernelLinux builder
-