com.io7m.r2.core

## Class R2MaskInstances.Builder

- java.lang.Object
- - com.io7m.r2.core.R2MaskInstances.Builder

- Enclosing class:
    R2MaskInstances

      public static final class R2MaskInstances.Builder
      extends Object

  Builds instances of type `R2MaskInstances`. 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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `R2MaskInstances.Builder` | `addAllBatched(Iterable<? extends R2InstanceBatchedType> elements)` Adds elements to `batched` list.
    `R2MaskInstances.Builder` | `addAllSingles(Iterable<? extends R2InstanceSingleType> elements)` Adds elements to `singles` list.
    `R2MaskInstances.Builder` | `addBatched(R2InstanceBatchedType... elements)` Adds elements to `batched` list.
    `R2MaskInstances.Builder` | `addBatched(R2InstanceBatchedType element)` Adds one element to `batched` list.
    `R2MaskInstances.Builder` | `addSingles(R2InstanceSingleType... elements)` Adds elements to `singles` list.
    `R2MaskInstances.Builder` | `addSingles(R2InstanceSingleType element)` Adds one element to `singles` list.
    `R2MaskInstances` | `build()` Builds a new `R2MaskInstances`.
    `R2MaskInstances.Builder` | `from(R2MaskInstancesType instance)` Fill a builder with attribute values from the provided `R2MaskInstancesType` instance.
    `R2MaskInstances.Builder` | `setBatched(Iterable<? extends R2InstanceBatchedType> elements)` Sets or replaces all elements for `batched` list.
    `R2MaskInstances.Builder` | `setSingles(Iterable<? extends R2InstanceSingleType> elements)` Sets or replaces all elements for `singles` list.

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

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

- - ### Method Detail

    - #### from

          public final R2MaskInstances.Builder from(R2MaskInstancesType instance)

      Fill a builder with attribute values from the provided `R2MaskInstancesType` 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

    - #### addSingles

          public final R2MaskInstances.Builder addSingles(R2InstanceSingleType element)

      Adds one element to `singles` list.
      Parameters:
        `element` - A singles element
      Returns:
        `this` builder for use in a chained invocation

    - #### addSingles

          public final R2MaskInstances.Builder addSingles(R2InstanceSingleType... elements)

      Adds elements to `singles` list.
      Parameters:
        `elements` - An array of singles elements
      Returns:
        `this` builder for use in a chained invocation

    - #### setSingles

          public final R2MaskInstances.Builder setSingles(Iterable<? extends R2InstanceSingleType> elements)

      Sets or replaces all elements for `singles` list.
      Parameters:
        `elements` - An iterable of singles elements
      Returns:
        `this` builder for use in a chained invocation

    - #### addAllSingles

          public final R2MaskInstances.Builder addAllSingles(Iterable<? extends R2InstanceSingleType> elements)

      Adds elements to `singles` list.
      Parameters:
        `elements` - An iterable of singles elements
      Returns:
        `this` builder for use in a chained invocation

    - #### addBatched

          public final R2MaskInstances.Builder addBatched(R2InstanceBatchedType element)

      Adds one element to `batched` list.
      Parameters:
        `element` - A batched element
      Returns:
        `this` builder for use in a chained invocation

    - #### addBatched

          public final R2MaskInstances.Builder addBatched(R2InstanceBatchedType... elements)

      Adds elements to `batched` list.
      Parameters:
        `elements` - An array of batched elements
      Returns:
        `this` builder for use in a chained invocation

    - #### setBatched

          public final R2MaskInstances.Builder setBatched(Iterable<? extends R2InstanceBatchedType> elements)

      Sets or replaces all elements for `batched` list.
      Parameters:
        `elements` - An iterable of batched elements
      Returns:
        `this` builder for use in a chained invocation

    - #### addAllBatched

          public final R2MaskInstances.Builder addAllBatched(Iterable<? extends R2InstanceBatchedType> elements)

      Adds elements to `batched` list.
      Parameters:
        `elements` - An iterable of batched elements
      Returns:
        `this` builder for use in a chained invocation

    - #### build

          public R2MaskInstances build()

      Builds a new `R2MaskInstances`.
      Returns:
        An immutable instance of R2MaskInstances
      Throws:
        `IllegalStateException` - if any required attributes are missing

Copyright © 2017 <code@io7m.com> http://io7m.com