Package com.io7m.waxmill.machines

# Class WXMGRUBKernelLinux.Builder

java.lang.Object
com.io7m.waxmill.machines.WXMGRUBKernelLinux.Builder

Enclosing class:
  WXMGRUBKernelLinux

    public static final class WXMGRUBKernelLinux.Builder
    extends java.lang.Object

Builds instances of type `WXMGRUBKernelLinux`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

`Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `WXMGRUBKernelLinux.Builder` | `addAllKernelArguments​(java.lang.Iterable<java.lang.String> elements)` | Adds elements to `kernelArguments` list.
  `WXMGRUBKernelLinux.Builder` | `addKernelArguments​(java.lang.String element)` | Adds one element to `kernelArguments` list.
  `WXMGRUBKernelLinux.Builder` | `addKernelArguments​(java.lang.String... elements)` | Adds elements to `kernelArguments` list.
  `WXMGRUBKernelLinux` | `build()` | Builds a new `WXMGRUBKernelLinux`.
  `WXMGRUBKernelLinux.Builder` | `from​(WXMBootConfigurationType.WXMGRUBKernelLinuxType instance)` | Fill a builder with attribute values from the provided `WXMGRUBKernelLinuxType` instance.
  `WXMGRUBKernelLinux.Builder` | `setInitRDDevice​(WXMDeviceSlot initRDDevice)` | Initializes the value for the `initRDDevice` attribute.
  `WXMGRUBKernelLinux.Builder` | `setInitRDPath​(java.nio.file.Path initRDPath)` | Initializes the value for the `initRDPath` attribute.
  `WXMGRUBKernelLinux.Builder` | `setKernelArguments​(java.lang.Iterable<java.lang.String> elements)` | Sets or replaces all elements for `kernelArguments` list.
  `WXMGRUBKernelLinux.Builder` | `setKernelDevice​(WXMDeviceSlot kernelDevice)` | Initializes the value for the `kernelDevice` attribute.
  `WXMGRUBKernelLinux.Builder` | `setKernelPath​(java.nio.file.Path kernelPath)` | Initializes the value for the `kernelPath` attribute.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final WXMGRUBKernelLinux.Builder from​(WXMBootConfigurationType.WXMGRUBKernelLinuxType instance)
    Fill a builder with attribute values from the provided `WXMGRUBKernelLinuxType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### setKernelDevice

    public final WXMGRUBKernelLinux.Builder setKernelDevice​(WXMDeviceSlot kernelDevice)
    Initializes the value for the `kernelDevice` attribute.
    Parameters:
      `kernelDevice` - The value for kernelDevice
    Returns:
      `this` builder for use in a chained invocation

  - ### setKernelPath

    public final WXMGRUBKernelLinux.Builder setKernelPath​(java.nio.file.Path kernelPath)
    Initializes the value for the `kernelPath` attribute.
    Parameters:
      `kernelPath` - The value for kernelPath
    Returns:
      `this` builder for use in a chained invocation

  - ### addKernelArguments

    public final WXMGRUBKernelLinux.Builder addKernelArguments​(java.lang.String element)
    Adds one element to `kernelArguments` list.
    Parameters:
      `element` - A kernelArguments element
    Returns:
      `this` builder for use in a chained invocation

  - ### addKernelArguments

    public final WXMGRUBKernelLinux.Builder addKernelArguments​(java.lang.String... elements)
    Adds elements to `kernelArguments` list.
    Parameters:
      `elements` - An array of kernelArguments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setKernelArguments

    public final WXMGRUBKernelLinux.Builder setKernelArguments​(java.lang.Iterable<java.lang.String> elements)
    Sets or replaces all elements for `kernelArguments` list.
    Parameters:
      `elements` - An iterable of kernelArguments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllKernelArguments

    public final WXMGRUBKernelLinux.Builder addAllKernelArguments​(java.lang.Iterable<java.lang.String> elements)
    Adds elements to `kernelArguments` list.
    Parameters:
      `elements` - An iterable of kernelArguments elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setInitRDDevice

    public final WXMGRUBKernelLinux.Builder setInitRDDevice​(WXMDeviceSlot initRDDevice)
    Initializes the value for the `initRDDevice` attribute.
    Parameters:
      `initRDDevice` - The value for initRDDevice
    Returns:
      `this` builder for use in a chained invocation

  - ### setInitRDPath

    public final WXMGRUBKernelLinux.Builder setInitRDPath​(java.nio.file.Path initRDPath)
    Initializes the value for the `initRDPath` attribute.
    Parameters:
      `initRDPath` - The value for initRDPath
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public WXMGRUBKernelLinux build()
    Builds a new `WXMGRUBKernelLinux`.
    Returns:
      An immutable instance of WXMGRUBKernelLinux
    Throws:
      `java.lang.IllegalStateException` - if any required attributes are missing