org.apache.cassandra.db.composites

## Class CompositesBuilder

- java.lang.Object
- - org.apache.cassandra.db.composites.CompositesBuilder

-     public final class CompositesBuilder
      extends java.lang.Object

  Builder that allow to build multiple composites at the same time.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositesBuilder(CType ctype)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompositesBuilder` | `addAllElementsToAll(java.util.List<java.util.List<java.nio.ByteBuffer>> values)` Adds individually each of the specified list of elements to the end of all of the existing composites.
    `CompositesBuilder` | `addEachElementToAll(java.util.List<java.nio.ByteBuffer> values)` Adds individually each of the specified elements to the end of all of the existing composites.
    `CompositesBuilder` | `addElementToAll(java.nio.ByteBuffer value)` Adds the specified element to all the composites.
    `java.util.List<Composite>` | `build()` Builds the `Composites`.
    `java.util.List<Composite>` | `buildWithEOC(Composite.EOC eoc)` Builds the `Composites` with the specified EOC.
    `boolean` | `containsNull()` Checks if the composites contains null elements.
    `boolean` | `containsUnset()` Checks if the composites contains unset elements.
    `boolean` | `hasMissingElements()` Checks if some empty list of values have been added
    `boolean` | `hasRemaining()` Checks if some elements can still be added to the composites.
    `boolean` | `isEmpty()` Checks if this builder is empty.
    `int` | `remainingCount()` Returns the number of elements that can be added to the composites.

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

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

- - ### Constructor Detail

    - #### CompositesBuilder

          public CompositesBuilder(CType ctype)

  - ### Method Detail

    - #### addElementToAll

          public CompositesBuilder addElementToAll(java.nio.ByteBuffer value)

      Adds the specified element to all the composites.

      If this builder contains 2 composites: A-B and A-C a call to this method to add D will result in the composites: A-B-D and A-C-D.

      Parameters:
        `value` - the value of the next element
      Returns:
        this `CompositeBuilder`

    - #### addEachElementToAll

          public CompositesBuilder addEachElementToAll(java.util.List<java.nio.ByteBuffer> values)

      Adds individually each of the specified elements to the end of all of the existing composites.

      If this builder contains 2 composites: A-B and A-C a call to this method to add D and E will result in the 4 composites: A-B-D, A-B-E, A-C-D and A-C-E.

      Parameters:
        `values` - the elements to add
      Returns:
        this `CompositeBuilder`

    - #### addAllElementsToAll

          public CompositesBuilder addAllElementsToAll(java.util.List<java.util.List<java.nio.ByteBuffer>> values)

      Adds individually each of the specified list of elements to the end of all of the existing composites.

      If this builder contains 2 composites: A-B and A-C a call to this method to add [[D, E], [F, G]] will result in the 4 composites: A-B-D-E, A-B-F-G, A-C-D-E and A-C-F-G.

      Parameters:
        `values` - the elements to add
      Returns:
        this `CompositeBuilder`

    - #### remainingCount

          public int remainingCount()

      Returns the number of elements that can be added to the composites.
      Returns:
        the number of elements that can be added to the composites.

    - #### hasRemaining

          public boolean hasRemaining()

      Checks if some elements can still be added to the composites.
      Returns:
        `true` if it is possible to add more elements to the composites, `false` otherwise.

    - #### isEmpty

          public boolean isEmpty()

      Checks if this builder is empty.
      Returns:
        `true` if this builder is empty, `false` otherwise.

    - #### containsNull

          public boolean containsNull()

      Checks if the composites contains null elements.
      Returns:
        `true` if the composites contains `null` elements, `false` otherwise.

    - #### hasMissingElements

          public boolean hasMissingElements()

      Checks if some empty list of values have been added
      Returns:
        `true` if the composites have some missing elements, `false` otherwise.

    - #### containsUnset

          public boolean containsUnset()

      Checks if the composites contains unset elements.
      Returns:
        `true` if the composites contains `unset` elements, `false` otherwise.

    - #### build

          public java.util.List<Composite> build()

      Builds the `Composites`.
      Returns:
        the composites

    - #### buildWithEOC

          public java.util.List<Composite> buildWithEOC(Composite.EOC eoc)

      Builds the `Composites` with the specified EOC.
      Returns:
        the composites

Copyright © 2018 The Apache Software Foundation