Package com.io7m.waxmill.machines

# Class WXMEvaluatedBootCommands.Builder

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

Enclosing class:
  WXMEvaluatedBootCommands

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

Builds instances of type `WXMEvaluatedBootCommands`. 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
  --- | --- | ---
  `WXMEvaluatedBootCommands.Builder` | `addAllConfigurationCommands​(java.lang.Iterable<? extends WXMCommandExecution> elements)` | Adds elements to `configurationCommands` list.
  `WXMEvaluatedBootCommands.Builder` | `addConfigurationCommands​(WXMCommandExecution element)` | Adds one element to `configurationCommands` list.
  `WXMEvaluatedBootCommands.Builder` | `addConfigurationCommands​(WXMCommandExecution... elements)` | Adds elements to `configurationCommands` list.
  `WXMEvaluatedBootCommands` | `build()` | Builds a new `WXMEvaluatedBootCommands`.
  `WXMEvaluatedBootCommands.Builder` | `from​(WXMBootConfigurationType.WXMEvaluatedBootCommandsType instance)` | Fill a builder with attribute values from the provided `WXMEvaluatedBootCommandsType` instance.
  `WXMEvaluatedBootCommands.Builder` | `setConfigurationCommands​(java.lang.Iterable<? extends WXMCommandExecution> elements)` | Sets or replaces all elements for `configurationCommands` list.
  `WXMEvaluatedBootCommands.Builder` | `setLastExecution​(WXMCommandExecution lastExecution)` | Initializes the optional value `lastExecution` to lastExecution.
  `WXMEvaluatedBootCommands.Builder` | `setLastExecution​(java.util.Optional<? extends WXMCommandExecution> lastExecution)` | Initializes the optional value `lastExecution` to lastExecution.

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

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

- ## Method Details

  - ### from

    public final WXMEvaluatedBootCommands.Builder from​(WXMBootConfigurationType.WXMEvaluatedBootCommandsType instance)
    Fill a builder with attribute values from the provided `WXMEvaluatedBootCommandsType` 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

  - ### addConfigurationCommands

    public final WXMEvaluatedBootCommands.Builder addConfigurationCommands​(WXMCommandExecution element)
    Adds one element to `configurationCommands` list.
    Parameters:
      `element` - A configurationCommands element
    Returns:
      `this` builder for use in a chained invocation

  - ### addConfigurationCommands

    public final WXMEvaluatedBootCommands.Builder addConfigurationCommands​(WXMCommandExecution... elements)
    Adds elements to `configurationCommands` list.
    Parameters:
      `elements` - An array of configurationCommands elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setConfigurationCommands

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

  - ### addAllConfigurationCommands

    public final WXMEvaluatedBootCommands.Builder addAllConfigurationCommands​(java.lang.Iterable<? extends WXMCommandExecution> elements)
    Adds elements to `configurationCommands` list.
    Parameters:
      `elements` - An iterable of configurationCommands elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setLastExecution

    public final WXMEvaluatedBootCommands.Builder setLastExecution​(WXMCommandExecution lastExecution)
    Initializes the optional value `lastExecution` to lastExecution.
    Parameters:
      `lastExecution` - The value for lastExecution
    Returns:
      `this` builder for chained invocation

  - ### setLastExecution

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

  - ### build

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