Package com.io7m.waxmill.machines

# Class WXMStorageBackendFile.Builder

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

Enclosing class:
  WXMStorageBackendFile

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

Builds instances of type `WXMStorageBackendFile`. 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
  --- | --- | ---
  `WXMStorageBackendFile.Builder` | `addAllOptions​(java.lang.Iterable<WXMOpenOption> elements)` | Adds elements to `options` set.
  `WXMStorageBackendFile.Builder` | `addOptions​(WXMOpenOption element)` | Adds one element to `options` set.
  `WXMStorageBackendFile.Builder` | `addOptions​(WXMOpenOption... elements)` | Adds elements to `options` set.
  `WXMStorageBackendFile` | `build()` | Builds a new `WXMStorageBackendFile`.
  `WXMStorageBackendFile.Builder` | `from​(WXMDeviceType.WXMStorageBackendFileType instance)` | Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendFileType` instance.
  `WXMStorageBackendFile.Builder` | `from​(WXMDeviceType.WXMStorageBackendType instance)` | Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendType` instance.
  `WXMStorageBackendFile.Builder` | `setComment​(java.lang.String comment)` | Initializes the value for the `comment` attribute.
  `WXMStorageBackendFile.Builder` | `setFile​(java.nio.file.Path file)` | Initializes the value for the `file` attribute.
  `WXMStorageBackendFile.Builder` | `setOptions​(java.lang.Iterable<WXMOpenOption> elements)` | Sets or replaces all elements for `options` set.
  `WXMStorageBackendFile.Builder` | `setSectorSizes​(WXMSectorSizes sectorSizes)` | Initializes the optional value `sectorSizes` to sectorSizes.
  `WXMStorageBackendFile.Builder` | `setSectorSizes​(java.util.Optional<? extends WXMSectorSizes> sectorSizes)` | Initializes the optional value `sectorSizes` to sectorSizes.

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

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

- ## Method Details

  - ### from

    public final WXMStorageBackendFile.Builder from​(WXMDeviceType.WXMStorageBackendFileType instance)
    Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendFileType` instance.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### from

    public final WXMStorageBackendFile.Builder from​(WXMDeviceType.WXMStorageBackendType instance)
    Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendType` instance.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### setFile

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

  - ### addOptions

    public final WXMStorageBackendFile.Builder addOptions​(WXMOpenOption element)
    Adds one element to `options` set.
    Parameters:
      `element` - A options element
    Returns:
      `this` builder for use in a chained invocation

  - ### addOptions

    public final WXMStorageBackendFile.Builder addOptions​(WXMOpenOption... elements)
    Adds elements to `options` set.
    Parameters:
      `elements` - An array of options elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setOptions

    public final WXMStorageBackendFile.Builder setOptions​(java.lang.Iterable<WXMOpenOption> elements)
    Sets or replaces all elements for `options` set.
    Parameters:
      `elements` - An iterable of options elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllOptions

    public final WXMStorageBackendFile.Builder addAllOptions​(java.lang.Iterable<WXMOpenOption> elements)
    Adds elements to `options` set.
    Parameters:
      `elements` - An iterable of options elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setSectorSizes

    public final WXMStorageBackendFile.Builder setSectorSizes​(WXMSectorSizes sectorSizes)
    Initializes the optional value `sectorSizes` to sectorSizes.
    Parameters:
      `sectorSizes` - The value for sectorSizes
    Returns:
      `this` builder for chained invocation

  - ### setSectorSizes

    public final WXMStorageBackendFile.Builder setSectorSizes​(java.util.Optional<? extends WXMSectorSizes> sectorSizes)
    Initializes the optional value `sectorSizes` to sectorSizes.
    Parameters:
      `sectorSizes` - The value for sectorSizes
    Returns:
      `this` builder for use in a chained invocation

  - ### setComment

    public final WXMStorageBackendFile.Builder setComment​(java.lang.String comment)
    Initializes the value for the `comment` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `comment`.

    Parameters:
      `comment` - The value for comment
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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