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 class` | `WXMGRUBKernelOpenBSD.Builder` | Builds instances of type `WXMGRUBKernelOpenBSD`.

  ## Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMGRUBKernelInstructionsType

  `WXMBootConfigurationType.WXMGRUBKernelInstructionsType.Kind`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `WXMDeviceSlot` | `bootDevice()` |
  `static WXMGRUBKernelOpenBSD.Builder` | `builder()` | Creates a builder for `WXMGRUBKernelOpenBSD`.
  `static WXMGRUBKernelOpenBSD` | `copyOf​(WXMBootConfigurationType.WXMGRUBKernelOpenBSDType instance)` | Creates an immutable copy of a `WXMBootConfigurationType.WXMGRUBKernelOpenBSDType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMGRUBKernelOpenBSD` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `bootDevice`, `partition`, `kernelPath`.
  `java.nio.file.Path` | `kernelPath()` |
  `java.lang.String` | `partition()` | The name of the partition within which to find the kernel.
  `java.lang.String` | `toString()` | Prints the immutable value `WXMGRUBKernelOpenBSD` with attribute values.
  `WXMGRUBKernelOpenBSD` | `withBootDevice​(WXMDeviceSlot value)` | Copy the current immutable object by setting a value for the `bootDevice` attribute.
  `WXMGRUBKernelOpenBSD` | `withKernelPath​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `kernelPath` attribute.
  `WXMGRUBKernelOpenBSD` | `withPartition​(java.lang.String value)` | Copy the current immutable object by setting a value for the `partition` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMGRUBKernelOpenBSDType

  `checkPreconditions, kind, requiredDevices`

- ## Method Details

  - ### bootDevice

    public WXMDeviceSlot bootDevice()
    Specified by:
      `bootDevice` in interface `WXMBootConfigurationType.WXMGRUBKernelOpenBSDType`
    Returns:
      The device from which booting will occur

  - ### partition

    public java.lang.String partition()
    The name of the partition within which to find the kernel. This is typically `openbsd1` if the defaults are picked in the OpenBSD installer.
    Specified by:
      `partition` in interface `WXMBootConfigurationType.WXMGRUBKernelOpenBSDType`
    Returns:
      The name of the partition

  - ### kernelPath

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

  - ### withBootDevice

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

  - ### withPartition

    public final WXMGRUBKernelOpenBSD withPartition​(java.lang.String value)
    Copy the current immutable object by setting a value for the `partition` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for partition
    Returns:
      A modified copy of the `this` object

  - ### withKernelPath

    public final WXMGRUBKernelOpenBSD 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

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMGRUBKernelOpenBSD` 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: `bootDevice`, `partition`, `kernelPath`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

    public static WXMGRUBKernelOpenBSD copyOf​(WXMBootConfigurationType.WXMGRUBKernelOpenBSDType instance)
    Creates an immutable copy of a `WXMBootConfigurationType.WXMGRUBKernelOpenBSDType` 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 WXMGRUBKernelOpenBSD instance

  - ### builder

    public static WXMGRUBKernelOpenBSD.Builder builder()
    Creates a builder for `WXMGRUBKernelOpenBSD`.

         WXMGRUBKernelOpenBSD.builder()
            .setBootDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // required bootDevice
            .setPartition(String) // required partition
            .setKernelPath(java.nio.file.Path) // required kernelPath
            .build();

    Returns:
      A new WXMGRUBKernelOpenBSD builder