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.
  • Method Details

    • kernelDevice

      public WXMDeviceSlot kernelDevice()
      Specified by:
      kernelDevice in interface WXMBootConfigurationType.WXMGRUBKernelLinuxType
      Returns:
      The device that contains the kernel
    • kernelPath

      public java.nio.file.Path kernelPath()
      Specified by:
      kernelPath in interface WXMBootConfigurationType.WXMGRUBKernelLinuxType
      Returns:
      The path to the kernel on the guest filesystem
    • kernelArguments

      public java.util.List<java.lang.String> kernelArguments()
      Specified by:
      kernelArguments in interface WXMBootConfigurationType.WXMGRUBKernelLinuxType
      Returns:
      The arguments for the kernel
    • initRDDevice

      public WXMDeviceSlot initRDDevice()
      Specified by:
      initRDDevice in interface WXMBootConfigurationType.WXMGRUBKernelLinuxType
      Returns:
      The device that contains the initial ramdisk
    • initRDPath

      public java.nio.file.Path initRDPath()
      Specified by:
      initRDPath in interface WXMBootConfigurationType.WXMGRUBKernelLinuxType
      Returns:
      The path to the initial ramdisk on the guest filesystem
    • withKernelDevice

      public final WXMGRUBKernelLinux withKernelDevice​(WXMDeviceSlot value)
      Copy the current immutable object by setting a value for the kernelDevice attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for kernelDevice
      Returns:
      A modified copy of the this object
    • withKernelPath

      public final WXMGRUBKernelLinux withKernelPath​(java.nio.file.Path value)
      Copy the current immutable object by setting a value for the kernelPath attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for kernelPath
      Returns:
      A modified copy of the this object
    • withKernelArguments

      public final WXMGRUBKernelLinux withKernelArguments​(java.lang.String... elements)
      Copy the current immutable object with elements that replace the content of kernelArguments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withKernelArguments

      public final WXMGRUBKernelLinux withKernelArguments​(java.lang.Iterable<java.lang.String> elements)
      Copy the current immutable object with elements that replace the content of kernelArguments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of kernelArguments elements to set
      Returns:
      A modified copy of this object
    • withInitRDDevice

      public final WXMGRUBKernelLinux withInitRDDevice​(WXMDeviceSlot value)
      Copy the current immutable object by setting a value for the initRDDevice attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for initRDDevice
      Returns:
      A modified copy of the this object
    • withInitRDPath

      public final WXMGRUBKernelLinux withInitRDPath​(java.nio.file.Path value)
      Copy the current immutable object by setting a value for the initRDPath attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for initRDPath
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of WXMGRUBKernelLinux that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: kernelDevice, kernelPath, kernelArguments, initRDDevice, initRDPath.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value WXMGRUBKernelLinux with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a WXMBootConfigurationType.WXMGRUBKernelLinuxType value. 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

      public static WXMGRUBKernelLinux.Builder builder()
      Creates a builder for WXMGRUBKernelLinux.
       WXMGRUBKernelLinux.builder()
          .setKernelDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // required kernelDevice
          .setKernelPath(java.nio.file.Path) // required kernelPath
          .addKernelArguments|addAllKernelArguments(String) // kernelArguments elements
          .setInitRDDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // required initRDDevice
          .setInitRDPath(java.nio.file.Path) // required initRDPath
          .build();
       
      Returns:
      A new WXMGRUBKernelLinux builder