Package com.io7m.waxmill.machines

# Class WXMDeviceLPC.Builder

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

Enclosing class:
  WXMDeviceLPC

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

Builds instances of type `WXMDeviceLPC`. 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
  --- | --- | ---
  `WXMDeviceLPC.Builder` | `addAllBackends​(java.lang.Iterable<? extends WXMDeviceType.WXMTTYBackendType> elements)` | Adds elements to `backends` list.
  `WXMDeviceLPC.Builder` | `addBackends​(WXMDeviceType.WXMTTYBackendType element)` | Adds one element to `backends` list.
  `WXMDeviceLPC.Builder` | `addBackends​(WXMDeviceType.WXMTTYBackendType... elements)` | Adds elements to `backends` list.
  `WXMDeviceLPC` | `build()` | Builds a new `WXMDeviceLPC`.
  `WXMDeviceLPC.Builder` | `from​(WXMDeviceType instance)` | Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType` instance.
  `WXMDeviceLPC.Builder` | `from​(WXMDeviceType.WXMDeviceLPCType instance)` | Fill a builder with attribute values from the provided `com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceLPCType` instance.
  `WXMDeviceLPC.Builder` | `setBackends​(java.lang.Iterable<? extends WXMDeviceType.WXMTTYBackendType> elements)` | Sets or replaces all elements for `backends` list.
  `WXMDeviceLPC.Builder` | `setComment​(java.lang.String comment)` | Initializes the value for the `comment` attribute.
  `WXMDeviceLPC.Builder` | `setDeviceSlot​(WXMDeviceSlot deviceSlot)` | Initializes the value for the `deviceSlot` attribute.

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

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

- ## Method Details

  - ### from

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

  - ### from

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

  - ### setDeviceSlot

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

  - ### setComment

    public final WXMDeviceLPC.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

  - ### addBackends

    public final WXMDeviceLPC.Builder addBackends​(WXMDeviceType.WXMTTYBackendType element)
    Adds one element to `backends` list.
    Parameters:
      `element` - A backends element
    Returns:
      `this` builder for use in a chained invocation

  - ### addBackends

    public final WXMDeviceLPC.Builder addBackends​(WXMDeviceType.WXMTTYBackendType... elements)
    Adds elements to `backends` list.
    Parameters:
      `elements` - An array of backends elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setBackends

    public final WXMDeviceLPC.Builder setBackends​(java.lang.Iterable<? extends WXMDeviceType.WXMTTYBackendType> elements)
    Sets or replaces all elements for `backends` list.
    Parameters:
      `elements` - An iterable of backends elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllBackends

    public final WXMDeviceLPC.Builder addAllBackends​(java.lang.Iterable<? extends WXMDeviceType.WXMTTYBackendType> elements)
    Adds elements to `backends` list.
    Parameters:
      `elements` - An iterable of backends elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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