org.apache.lucene.util.packed

## Class PackedLongValues.Builder

- java.lang.Object
- - org.apache.lucene.util.packed.PackedLongValues.Builder

- All Implemented Interfaces:
    Accountable
  Enclosing class:
    PackedLongValues

      public static class PackedLongValues.Builder
      extends Object
      implements Accountable

  A Builder for a `PackedLongValues` instance.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PackedLongValues.Builder` | `add(long l)` Add a new element to this builder.
    `PackedLongValues` | `build()` Build a `PackedLongValues` instance that contains values that have been added to this builder.
    `Collection<Accountable>` | `getChildResources()` Returns nested resources of this class.
    `long` | `ramBytesUsed()` Return the memory usage of this object in bytes.
    `long` | `size()` Return the number of elements that have been added to this builder.

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

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

- - ### Method Detail

    - #### build

          public PackedLongValues build()

      Build a `PackedLongValues` instance that contains values that have been added to this builder. This operation is destructive.

    - #### ramBytesUsed

          public final long ramBytesUsed()

      Description copied from interface: `Accountable`
      Return the memory usage of this object in bytes. Negative values are illegal.
      Specified by:
        `ramBytesUsed` in interface `Accountable`

    - #### getChildResources

          public Collection<Accountable> getChildResources()

      Description copied from interface: `Accountable`
      Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
      Specified by:
        `getChildResources` in interface `Accountable`
      See Also:
        `Accountables`

    - #### size

          public final long size()

      Return the number of elements that have been added to this builder.

    - #### add

          public PackedLongValues.Builder add(long l)

      Add a new element to this builder.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.