Package com.io7m.waxmill.machines

# Class WXMTTYBackendFile.Builder

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

Enclosing class:
  WXMTTYBackendFile

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

Builds instances of type `WXMTTYBackendFile`. 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
  --- | --- | ---
  `WXMTTYBackendFile` | `build()` | Builds a new `WXMTTYBackendFile`.
  `WXMTTYBackendFile.Builder` | `from​(WXMDeviceType.WXMTTYBackendFileType instance)` | Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendFileType` instance.
  `WXMTTYBackendFile.Builder` | `from​(WXMDeviceType.WXMTTYBackendType instance)` | Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMTTYBackendType` instance.
  `WXMTTYBackendFile.Builder` | `setComment​(java.lang.String comment)` | Initializes the value for the `comment` attribute.
  `WXMTTYBackendFile.Builder` | `setDevice​(java.lang.String device)` | Initializes the value for the `device` attribute.
  `WXMTTYBackendFile.Builder` | `setPath​(java.nio.file.Path path)` | Initializes the value for the `path` attribute.

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

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

- ## Method Details

  - ### from

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

  - ### from

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

  - ### setPath

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

  - ### setDevice

    public final WXMTTYBackendFile.Builder setDevice​(java.lang.String device)
    Initializes the value for the `device` attribute.
    Parameters:
      `device` - The value for device
    Returns:
      `this` builder for use in a chained invocation

  - ### setComment

    public final WXMTTYBackendFile.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 WXMTTYBackendFile build()
    Builds a new `WXMTTYBackendFile`.
    Returns:
      An immutable instance of WXMTTYBackendFile
    Throws:
      `java.lang.IllegalStateException` - if any required attributes are missing