org.apache.cassandra.db.marshal

## Class CompositeType.Builder

- java.lang.Object
- - org.apache.cassandra.db.marshal.CompositeType.Builder

- All Implemented Interfaces:
    ColumnNameBuilder
  Enclosing class:
    CompositeType

      public static class CompositeType.Builder
      extends java.lang.Object
      implements ColumnNameBuilder

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeType.Builder(CompositeType composite)`
    `CompositeType.Builder(CompositeType composite, java.util.List<java.nio.ByteBuffer> components, byte[] endOfComponents)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompositeType.Builder` | `add(java.nio.ByteBuffer bb)` Add a new ByteBuffer as the next component for this name.
    `CompositeType.Builder` | `add(java.nio.ByteBuffer buffer, Relation.Type op)` Add a new ByteBuffer as the next component for this name.
    `java.nio.ByteBuffer` | `build()` Build the column name.
    `java.nio.ByteBuffer` | `buildAsEndOfRange()` Build the column name so that the result sorts at the end of the range represented by this (uncomplete) column name.
    `int` | `componentCount()` Returns the number of component already added to this builder.
    `CompositeType.Builder` | `copy()` Clone this builder.
    `int` | `remainingCount()`

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

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

- - ### Constructor Detail

    - #### CompositeType.Builder

          public CompositeType.Builder(CompositeType composite)

    - #### CompositeType.Builder

          public CompositeType.Builder(CompositeType composite,
                               java.util.List<java.nio.ByteBuffer> components,
                               byte[] endOfComponents)

  - ### Method Detail

    - #### add

          public CompositeType.Builder add(java.nio.ByteBuffer buffer,
                                  Relation.Type op)

      Description copied from interface: `ColumnNameBuilder`
      Add a new ByteBuffer as the next component for this name.
      Specified by:
        `add` in interface `ColumnNameBuilder`
        `op` - the relationship this component should respect.
      Returns:
        this builder

    - #### add

          public CompositeType.Builder add(java.nio.ByteBuffer bb)

      Description copied from interface: `ColumnNameBuilder`
      Add a new ByteBuffer as the next component for this name.
      Specified by:
        `add` in interface `ColumnNameBuilder`
      Parameters:
        `bb` - the ByteBuffer to add
      Returns:
        this builder

    - #### componentCount

          public int componentCount()

      Description copied from interface: `ColumnNameBuilder`
      Returns the number of component already added to this builder.
      Specified by:
        `componentCount` in interface `ColumnNameBuilder`
      Returns:
        the number of component in this Builder

    - #### remainingCount

          public int remainingCount()

      Specified by:
        `remainingCount` in interface `ColumnNameBuilder`
      Returns:
        the maximum number of component that can still be added to this Builder

    - #### build

          public java.nio.ByteBuffer build()

      Description copied from interface: `ColumnNameBuilder`
      Build the column name.
      Specified by:
        `build` in interface `ColumnNameBuilder`
      Returns:
        the built column name

    - #### buildAsEndOfRange

          public java.nio.ByteBuffer buildAsEndOfRange()

      Description copied from interface: `ColumnNameBuilder`
      Build the column name so that the result sorts at the end of the range represented by this (uncomplete) column name.
      Specified by:
        `buildAsEndOfRange` in interface `ColumnNameBuilder`

    - #### copy

          public CompositeType.Builder copy()

      Description copied from interface: `ColumnNameBuilder`
      Clone this builder.
      Specified by:
        `copy` in interface `ColumnNameBuilder`
      Returns:
        the cloned builder.

Copyright © 2014 The Apache Software Foundation