com.io7m.r2.core.debug

## Class R2DebugInstances.Builder

- java.lang.Object
- - com.io7m.r2.core.debug.R2DebugInstances.Builder

- Enclosing class:
    R2DebugInstances

      public static final class R2DebugInstances.Builder
      extends Object

  Builds instances of type `R2DebugInstances`. 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
    --- | ---
    `R2DebugInstances.Builder` | `addAllCubes(Iterable<? extends R2DebugCubeInstance> elements)` Adds elements to `cubes` list.
    `R2DebugInstances.Builder` | `addAllInstanceSingles(Iterable<? extends R2DebugInstanceSingle> elements)` Adds elements to `instanceSingles` list.
    `R2DebugInstances.Builder` | `addAllLineSegments(Iterable<? extends R2DebugLineSegment> elements)` Adds elements to `lineSegments` list.
    `R2DebugInstances.Builder` | `addCubes(R2DebugCubeInstance... elements)` Adds elements to `cubes` list.
    `R2DebugInstances.Builder` | `addCubes(R2DebugCubeInstance element)` Adds one element to `cubes` list.
    `R2DebugInstances.Builder` | `addInstanceSingles(R2DebugInstanceSingle... elements)` Adds elements to `instanceSingles` list.
    `R2DebugInstances.Builder` | `addInstanceSingles(R2DebugInstanceSingle element)` Adds one element to `instanceSingles` list.
    `R2DebugInstances.Builder` | `addLineSegments(R2DebugLineSegment... elements)` Adds elements to `lineSegments` list.
    `R2DebugInstances.Builder` | `addLineSegments(R2DebugLineSegment element)` Adds one element to `lineSegments` list.
    `R2DebugInstances` | `build()` Builds a new `R2DebugInstances`.
    `R2DebugInstances.Builder` | `from(R2DebugInstancesType instance)` Fill a builder with attribute values from the provided `R2DebugInstancesType` instance.
    `R2DebugInstances.Builder` | `setCubes(Iterable<? extends R2DebugCubeInstance> elements)` Sets or replaces all elements for `cubes` list.
    `R2DebugInstances.Builder` | `setInstanceSingles(Iterable<? extends R2DebugInstanceSingle> elements)` Sets or replaces all elements for `instanceSingles` list.
    `R2DebugInstances.Builder` | `setLineSegments(Iterable<? extends R2DebugLineSegment> elements)` Sets or replaces all elements for `lineSegments` list.

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

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

- - ### Method Detail

    - #### from

          public final R2DebugInstances.Builder from(R2DebugInstancesType instance)

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

    - #### addLineSegments

          public final R2DebugInstances.Builder addLineSegments(R2DebugLineSegment element)

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

    - #### addLineSegments

          public final R2DebugInstances.Builder addLineSegments(R2DebugLineSegment... elements)

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

    - #### setLineSegments

          public final R2DebugInstances.Builder setLineSegments(Iterable<? extends R2DebugLineSegment> elements)

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

    - #### addAllLineSegments

          public final R2DebugInstances.Builder addAllLineSegments(Iterable<? extends R2DebugLineSegment> elements)

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

    - #### addCubes

          public final R2DebugInstances.Builder addCubes(R2DebugCubeInstance element)

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

    - #### addCubes

          public final R2DebugInstances.Builder addCubes(R2DebugCubeInstance... elements)

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

    - #### setCubes

          public final R2DebugInstances.Builder setCubes(Iterable<? extends R2DebugCubeInstance> elements)

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

    - #### addAllCubes

          public final R2DebugInstances.Builder addAllCubes(Iterable<? extends R2DebugCubeInstance> elements)

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

    - #### addInstanceSingles

          public final R2DebugInstances.Builder addInstanceSingles(R2DebugInstanceSingle element)

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

    - #### addInstanceSingles

          public final R2DebugInstances.Builder addInstanceSingles(R2DebugInstanceSingle... elements)

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

    - #### setInstanceSingles

          public final R2DebugInstances.Builder setInstanceSingles(Iterable<? extends R2DebugInstanceSingle> elements)

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

    - #### addAllInstanceSingles

          public final R2DebugInstances.Builder addAllInstanceSingles(Iterable<? extends R2DebugInstanceSingle> elements)

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

    - #### build

          public R2DebugInstances build()

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

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