Package com.io7m.waxmill.machines

# Class WXMZFSFilesystem

java.lang.Object
com.io7m.waxmill.machines.WXMZFSFilesystem

All Implemented Interfaces:
  `WXMZFSFilesystemType`

    public final class WXMZFSFilesystem
    extends java.lang.Object
    implements WXMZFSFilesystemType

A ZFS filesystem.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMZFSFilesystem.Builder` | Builds instances of type `WXMZFSFilesystem`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXMZFSFilesystem.Builder` | `builder()` | Creates a builder for `WXMZFSFilesystem`.
  `static WXMZFSFilesystem` | `copyOf​(WXMZFSFilesystemType instance)` | Creates an immutable copy of a `WXMZFSFilesystemType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMZFSFilesystem` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `name`, `mountPoint`.
  `java.nio.file.Path` | `mountPoint()` | The path at which the filesystem is mounted.
  `java.lang.String` | `name()` | The name of the filesystem.
  `java.lang.String` | `toString()` | Prints the immutable value `WXMZFSFilesystem` with attribute values.
  `WXMZFSFilesystem` | `withMountPoint​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `mountPoint` attribute.
  `WXMZFSFilesystem` | `withName​(java.lang.String value)` | Copy the current immutable object by setting a value for the `name` attribute.

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

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

  ### Methods inherited from interface com.io7m.waxmill.machines.WXMZFSFilesystemType

  `checkPreconditions`

- ## Method Details

  - ### name

    public java.lang.String name()
    The name of the filesystem. This is the name that would be, for example, passed to `zfs create -V name/of/fs`.
    Specified by:
      `name` in interface `WXMZFSFilesystemType`
    Returns:
      The name of the filesystem

  - ### mountPoint

    public java.nio.file.Path mountPoint()
    The path at which the filesystem is mounted.
    Specified by:
      `mountPoint` in interface `WXMZFSFilesystemType`
    Returns:
      The filesystem mount point

  - ### withName

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

  - ### withMountPoint

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

  - ### equals

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

  - ### toString

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

  - ### copyOf

    public static WXMZFSFilesystem copyOf​(WXMZFSFilesystemType instance)
    Creates an immutable copy of a `WXMZFSFilesystemType` 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 WXMZFSFilesystem instance

  - ### builder

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

         WXMZFSFilesystem.builder()
            .setName(String) // required name
            .setMountPoint(java.nio.file.Path) // required mountPoint
            .build();

    Returns:
      A new WXMZFSFilesystem builder