org.apache.lucene.util.packed

## Class AppendingLongBuffer

- java.lang.Object
- - org.apache.lucene.util.packed.AppendingLongBuffer

-     public final class AppendingLongBuffer
      extends Object

  Utility class to buffer a list of signed longs in memory. This class only supports appending and is optimized for the case where values are close to each other.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AppendingLongBuffer.Iterator` A long iterator.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AppendingLongBuffer()` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(long l)` Append a value to this buffer.
    `long` | `get(long index)` Get a value from this buffer.
    `AppendingLongBuffer.Iterator` | `iterator()` Return an iterator over the values of this buffer.
    `long` | `ramBytesUsed()` Return the number of bytes used by this instance.
    `long` | `size()` Get the number of values that have been added to the buffer.

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

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

- - ### Constructor Detail

    - #### AppendingLongBuffer

          public AppendingLongBuffer()

      Sole constructor.

  - ### Method Detail

    - #### iterator

          public AppendingLongBuffer.Iterator iterator()

      Return an iterator over the values of this buffer.

    - #### size

          public final long size()

      Get the number of values that have been added to the buffer.

    - #### add

          public final void add(long l)

      Append a value to this buffer.

    - #### get

          public final long get(long index)

      Get a value from this buffer.

    - #### ramBytesUsed

          public long ramBytesUsed()

      Return the number of bytes used by this instance.

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